npm install 不走代理导致 ECONNRESET 错误解决方案 - npm代理配置方法
最近更新:2026-01-29 | 字数总计:97 | 阅读估时:1分钟 | 阅读量:次
- npm install 不走代理导致 ECONNRESET
npm install 不走代理导致 ECONNRESET
现象
浏览器可打开 registry.npmjs.org
npm install 报错 ECONNRESET
原因
npm 不会自动使用系统/浏览器代理
npm 需要单独配置 proxy/https-proxy
解决
设置代理
1 2
| npm config set proxy http://127.0.0.1:33210 npm config set https-proxy http://127.0.0.1:33210
|
- 重试安装
- 清理配置
1 2
| npm config delete proxy npm config delete https-proxy
|