mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 23:56:07 +00:00
3.8 KiB
3.8 KiB
summary, title, read_when
| summary | title | read_when | |||
|---|---|---|---|---|---|
| Install and configure Node.js for OpenClaw - version requirements, install options, and PATH troubleshooting | Node.js |
|
OpenClaw requires Node 24 or newer. Node 24 is the default runtime for installs, CI, release workflows, and the SQLite-backed state layer. 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 v24.x.x or higher, you're on the supported runtime. 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_24.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 24
fnm use 24
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.
Related
- Install Overview - all installation methods
- Updating - keeping OpenClaw up to date
- Getting Started - first steps after install