OpenClaw 要求使用 Node 22.16 或更新版本。Node 24 是安装、CI 和发布工作流的默认且推荐的运行时。Node 22 仍通过 active LTS 系列受支持。安装脚本会自动检测并安装 Node - 本页适用于你想自行设置 Node,并确保所有内容正确连接时(版本、PATH、全局安装)。Documentation Index
Fetch the complete documentation index at: https://docs2.openclaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
检查你的版本
v24.x.x 或更高版本,说明你正在使用推荐的默认版本。如果输出 v22.16.x 或更高版本,说明你正在使用受支持的 Node 22 LTS 路径,但我们仍建议在方便时升级到 Node 24。如果未安装 Node,或版本太旧,请从下面选择一种安装方法。
安装 Node
- macOS
- Linux
- Windows
Using a version manager (nvm, fnm, mise, asdf)
Using a version manager (nvm, fnm, mise, asdf)
故障排除
openclaw: command not found
这几乎总是表示 npm 的全局 bin 目录不在你的 PATH 中。
npm install -g 上的权限错误(Linux)
如果你看到 EACCES 错误,请将 npm 的全局前缀切换到用户可写目录:
export PATH=... 这一行添加到你的 ~/.bashrc 或 ~/.zshrc,使其永久生效。