| 组件 | 要求 | 验证命令 |
| Node.js | 需安装 npm 和 node | npm -v / node -v |
| Git for Windows | 必须安装,用于 bash 脚本 | where.exe git |
| PowerShell | Windows 自带 - | |
| Git Bash | npm 构建需要 bash 环境 | 需配置路径 |
建议下载 LTS(长期支持版),如 v20.x 或 v22.x,安装时勾选 Add to PATH(自动添加到环境变量)
国内镜像(较快):https://registry.npmmirror.com/binary.html?path=git-for-windows/安装 Git for Windows 后,需要手动配置 npm 使用 Git Bash:
# 默认路径通常是:快速检查清单(前置安装软件)
npm config set script-shell "C:\Program Files\Git\bin\bash.exe"
# 或你的自定义路径:
npm config set script-shell "D:\Program Files\Git\bin\bash.exe"
# 1. 检查 Node.js源码安装步骤
node -v
# 2. 检查 npm
npm -v
# 3. 检查 Git
git --version
# 4. 检查 Git Bash 路径(根据你的安装位置)
Test-Path "D:\Program Files\Git\bin\bash.exe"
# 如果不存在,尝试查找:
where.exe bash
git clone https://github.com/openclaw/openclaw.git配置 npm 使用 Git Bash(关键步骤)
cd openclaw
| 欢迎光临 AI创想 (https://llms-ai.com/) | Powered by Discuz! X3.4 |