Files
openclaw/docs/install/node.md
Seb Slight 18b480dd3e Docs: sharpen Install tab to stop duplicating Getting Started (#10416)
* docs(install): reframe install overview to stop duplicating getting started

* docs(install): link default installer row to getting started, not internals

* docs(install): use Mintlify components for install overview

* docs(install): fix card grid layout with CardGroup

* docs(install): platform tabs for global install, npm/pnpm as accordion

* docs(install): add PowerShell no-onboard alternative

* docs(install): add repo link to from-source clone step

* docs(install): capitalize OpenClaw in repo link

* docs(install): add pnpm link --global to from-source steps

* docs(install): rewrite install overview for clarity and flow

* docs(install): use tooltip for Windows WSL2 recommendation

* docs(install): use Note box for Windows WSL2 recommendation

* docs(install): group install methods under single heading

* docs(install): standardize tab labels across installer sections

* docs(install): rewrite Node.js page with install instructions and better structure

* docs(install): clarify Node.js page intro

* docs(install): scope auto-install note to installer script, link Node page

* docs(install): fix installer script link to internals page

* docs: rename Install methods nav group to Other install methods

* docs(install): link to on-page anchor, use Tip box for recommended

* docs(install): wrap install methods in AccordionGroup with Tip box

* docs: move Node.js page from Install to Help > Environment and debugging

* docs(install): add complete flags and env vars reference to installer internals

* docs(install): use stable troubleshooting anchor for Node.js link

* docs(install): fix Node page installer anchor

* docs(install): fix broken installer script anchor in requirements note
2026-02-06 08:55:05 -05:00

3.5 KiB

title, summary, read_when
title summary read_when
Node.js Install and configure Node.js for OpenClaw — version requirements, install options, and PATH troubleshooting
You need to install Node.js before installing OpenClaw
You installed OpenClaw but `openclaw` is command not found
npm install -g fails with permissions or PATH issues

Node.js

OpenClaw requires Node 22 or newer. The installer script will detect and install Node automatically — this page is for when you want to set up Node yourself and make sure everything is wired up correctly (versions, PATH, global installs).

Check your version

node -v

If this prints v22.x.x or higher, you're good. If Node isn't installed or the version is too old, pick an install method below.

Install Node

**Homebrew** (recommended):
```bash
brew install node
```

Or download the macOS installer from [nodejs.org](https://nodejs.org/).
**Ubuntu / Debian:**
```bash
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
```

**Fedora / RHEL:**

```bash
sudo dnf install nodejs
```

Or use a version manager (see below).
**winget** (recommended):
```powershell
winget install OpenJS.NodeJS.LTS
```

**Chocolatey:**

```powershell
choco install nodejs-lts
```

Or download the Windows installer from [nodejs.org](https://nodejs.org/).
Version managers let you switch between Node versions easily. Popular options:
  • fnm — fast, cross-platform
  • nvm — widely used on macOS/Linux
  • mise — polyglot (Node, Python, Ruby, etc.)

Example with fnm:

fnm install 22
fnm use 22
Make sure your version manager is initialized in your shell startup file (`~/.zshrc` or `~/.bashrc`). If it isn't, `openclaw` may not be found in new terminal sessions because the PATH won't include Node's bin directory.

Troubleshooting

openclaw: command not found

This almost always means npm's global bin directory isn't on your PATH.

```bash npm prefix -g ``` ```bash echo "$PATH" ```
Look for `<npm-prefix>/bin` (macOS/Linux) or `<npm-prefix>` (Windows) in the output.
Add to `~/.zshrc` or `~/.bashrc`:
    ```bash
    export PATH="$(npm prefix -g)/bin:$PATH"
    ```

    Then open a new terminal (or run `rehash` in zsh / `hash -r` in bash).
  </Tab>
  <Tab title="Windows">
    Add the output of `npm prefix -g` to your system PATH via Settings → System → Environment Variables.
  </Tab>
</Tabs>

Permission errors on npm install -g (Linux)

If you see EACCES errors, switch npm's global prefix to a user-writable directory:

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.