> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fased.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Node.js

# Node.js

Fased recommends **Node 24** and supports **Node 22.14 or newer with the built-in
`node:sqlite` module**. The [installer script](/install) can install Node
automatically on common VPS and workstation families: Ubuntu, Debian, Kali,
Fedora, CentOS, AlmaLinux, Rocky Linux, CloudLinux, Oracle Linux, Amazon Linux,
openSUSE, SLES, Alpine, Arch, FreeBSD, WSL2 Ubuntu, and macOS with Homebrew. Use
this page when you want to set up Node yourself or debug PATH/runtime issues.

## Check your version

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
node -v
node -e 'require("node:sqlite"); console.log("node:sqlite ok")'
```

If this prints `v24.x` or `v22.14.x` or higher and `node:sqlite ok`, you are
set. If Node is missing, too old, or missing `node:sqlite`, pick an install
method below. Some custom/version-manager Node builds can report a new version
but still omit `node:sqlite`; those are not suitable for full memory support.

## Install Node

<Tabs>
  <Tab title="macOS">
    **Homebrew** (recommended). If Homebrew already exists, `./install.sh` can
    use it automatically.

    ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
    brew install node
    ```

    Or download the macOS installer from [nodejs.org](https://nodejs.org/).
  </Tab>

  <Tab title="Ubuntu">
    Use this for Ubuntu, Debian, or Kali:

    ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
    curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
    sudo apt-get install -y nodejs
    ```

    If NodeSource does not yet support a brand-new Ubuntu/Debian codename,
    install the distro packages and keep the `node:sqlite` verification step:

    ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
    sudo apt-get update
    sudo apt-get install -y nodejs npm
    node -e 'require("node:sqlite"); console.log("node:sqlite ok")'
    ```
  </Tab>

  <Tab title="Fedora">
    ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
    sudo dnf install -y nodejs24-bin nodejs24-npm-bin
    ```
  </Tab>

  <Tab title="RHEL">
    Use this for CentOS, AlmaLinux, Rocky Linux, CloudLinux, Oracle Linux, or
    Amazon Linux:

    ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
    curl -fsSL https://rpm.nodesource.com/setup_24.x | sudo bash -
    sudo dnf install -y nodejs
    ```

    Use `yum` instead of `dnf` on older images.
  </Tab>

  <Tab title="SUSE">
    Use this for openSUSE or SLES:

    ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
    sudo zypper --non-interactive install --no-recommends nodejs24 npm24
    ```
  </Tab>

  <Tab title="Alpine">
    ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
    sudo apk add --no-cache nodejs npm
    ```
  </Tab>

  <Tab title="Arch">
    ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
    sudo pacman -Sy --needed nodejs npm
    ```
  </Tab>

  <Tab title="FreeBSD">
    ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
    sudo pkg install -y node24 npm-node24
    ```
  </Tab>

  <Tab title="Windows / WSL2">
    Do not install Node with `winget`, Chocolatey, or a native Windows Node.js
    installer for the public Fased runtime. Install WSL2 Ubuntu, open the
    Ubuntu shell, and use the Ubuntu instructions in this page or let
    `install.sh` install Node automatically. Native Windows Node.js cannot run
    the Unix-socket wallet signer path, and the published npm package rejects
    native Windows with `EBADPLATFORM`. Do not force installation with npm
    platform overrides. See [Windows (WSL2)](/platforms/windows).
  </Tab>
</Tabs>

If Node 24 packages are unavailable for your OS, use Node 22.14 or newer with
`node:sqlite`, install Node 24 from your preferred trusted package source, or
use a version manager.

<Accordion title="Using a version manager (nvm, fnm, mise, asdf)">
  Version managers let you switch between Node versions easily. Popular options:

  * [**fnm**](https://github.com/Schniz/fnm) — fast, cross-platform
  * [**nvm**](https://github.com/nvm-sh/nvm) — widely used on macOS/Linux
  * [**mise**](https://mise.jdx.dev/) — polyglot (Node, Python, Ruby, etc.)

  Example with fnm:

  ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
  fnm install 22
  fnm use 22
  ```

  <Warning>
    Make sure your version manager is initialized in your shell startup file
    (`~/.zshrc` or `~/.bashrc`). If it is not, new terminal sessions may not find
    `fased` because PATH does not include Node's bin directory.
  </Warning>
</Accordion>

## Troubleshooting

### `fased: command not found`

macOS and explicit source installs write a small repo-backed launcher to
`${FASED_CLI_BIN_DIR:-$HOME/.local/bin}/fased`. Supported Linux Local and VPS
Hosting installs use the prebuilt runtime under
`~/.fased/install-cache/npm-global/bin/fased`.
This error usually means the relevant bin directory is not on your PATH, or
your shell has not reloaded its startup files yet.

<Steps>
  <Step title="Check for the launcher">
    ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
    ls -l "$HOME/.local/bin/fased"
    ```
  </Step>

  <Step title="Check if it's on your PATH">
    ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
    echo "$PATH"
    ```

    Look for `$HOME/.local/bin` in the output. If you used
    `FASED_CLI_BIN_DIR`, look for that directory instead.
  </Step>

  <Step title="Add it to your shell startup file">
    <Tabs>
      <Tab title="macOS / Linux">
        Add to `~/.zshrc` or `~/.bashrc`:

        ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
        export PATH="$HOME/.local/bin:$PATH"
        ```

        Then open a new terminal (or run `rehash` in zsh / `hash -r` in bash).
      </Tab>

      <Tab title="Windows / WSL2">
        Add the same line to the Ubuntu shell startup file inside WSL2. Native
        Windows Node.js is not a supported Fased runtime; use WSL2 for the
        normal public install path.
      </Tab>
    </Tabs>
  </Step>
</Steps>

### Advanced: npm global prefix problems

The public install path is the Fased curl installer. Hosted installs may use the
published npm package internally under `~/.fased/install-cache/npm-global`.

If you are debugging a maintainer/package test and see `EACCES` errors from a
manual npm global install, switch npm's global prefix to a user-writable
directory:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
mkdir -p "$HOME/.npm-global"
npm config set prefix "$HOME/.npm-global"
export PATH="$HOME/.npm-global/bin:$PATH"
```

Add the `export PATH=...` line to your `~/.bashrc` or `~/.zshrc` to make it permanent.
