安装问题
npm 安装超时:国内网络无法下载 OpenClaw
macOSWindowsLinux
症状
运行 npm install -g openclaw 时长时间无响应,最终报错:
npm ERR! network timeout
npm ERR! request to https://registry.npmjs.org/openclaw failed
原因
国内网络访问 npm 官方源(registry.npmjs.org)速度慢或被墙。
解法
方案一:切换国内镜像源
npm config set registry https://registry.npmmirror.com
npm install -g openclaw@latest
方案二:使用代理
export https_proxy=http://127.0.0.1:7890
export http_proxy=http://127.0.0.1:7890
npm install -g openclaw@latest
方案三:使用 cnpm
npm install -g cnpm --registry=https://registry.npmmirror.com
cnpm install -g openclaw@latest
验证修复
openclaw --version
# 应显示版本号