跳到正文
安装问题

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
# 应显示版本号
安装npm网络镜像

还是搞不定?

¥99 远程帮你解决,搞不定全额退款。

🦞 加入虾农大家庭

300+ OpenClaw 玩家在群里分享经验、互相帮忙

微信群二维码

二维码过期?添加微信 深夜开发者LND 备注「虾农」拉你入群