检查你的版本
v26 (any release) is the recommended default. v24.15.0 or newer 24.x remains fully supported (and is what CI pins); v22.22.3 or newer 22.x is the supported Node 22 LTS path; Node v25.9.0+ is also supported. Node 23 is unsupported. If Node is missing or outside the supported range, pick an install method below.
安装 Node
- macOS
- Linux
- Windows
使用版本管理器(nvm、fnm、mise、asdf)
使用版本管理器(nvm、fnm、mise、asdf)
故障排查
openclaw: command not found
这几乎总是意味着 npm 的全局 bin 目录没有加入你的 PATH。
1
查找你的 npm 全局前缀
2
检查它是否在你的 PATH 中
<npm-prefix>/bin(macOS/Linux)或 <npm-prefix>(Windows)。3
将其添加到你的 shell 启动文件
- macOS / Linux
- Windows
添加到 然后打开一个新的终端(或在 zsh 中运行
~/.zshrc 或 ~/.bashrc:rehash / 在 bash 中运行 hash -r)。npm install -g 的权限错误(Linux)
如果你看到 EACCES 错误,请将 npm 的全局前缀切换到一个用户可写的目录:
export PATH=... 这一行添加到你的 ~/.bashrc 或 ~/.zshrc 中,以使其永久生效。