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).Kiểm tra phiên bản
v22.x.x hoặc cao hơn, bạn đã sẵn sàng. Nếu Node chưa được cài hoặc phiên bản quá cũ, hãy chọn một phương thức cài đặt bên dưới.
Cài đặt Node
- macOS
- Linux
- Windows
Homebrew (khuyến nghị):
Using a version manager (nvm, fnm, mise, asdf)
Using a version manager (nvm, fnm, mise, asdf)
Xử lý sự cố
openclaw: command not found
Điều này hầu như luôn có nghĩa là thư mục bin toàn cục của npm không nằm trong PATH của bạn.
Lỗi quyền khi chạy npm install -g (Linux)
Nếu bạn thấy lỗi EACCES, hãy chuyển prefix toàn cục của npm sang một thư mục có quyền ghi cho người dùng:
export PATH=... vào ~/.bashrc hoặc ~/.zshrc để áp dụng vĩnh viễn.