【发布时间】:2014-11-21 03:06:31
【问题描述】:
这个错误信息已经在 Stack Overflow 上回答了好几次了,但是所有的解决方案都对我不起作用。
每当我npm install 时,我都会收到以下消息:
npm ERR! network tunneling socket could not be established, statusCode=407
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Repos\[repo-name]
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ECONNRESET
它之前工作过很多次,但突然停止工作。我记得唯一改变的是我安装了 VMWare Player。但我不明白为什么这是相关的。
有时,邮件中会显示cause=Parse Error,而不是statusCode=407。
我尝试了以下方法:
- 使用
npm config set proxy和npm config set https-proxy设置代理 - 将注册表更改为http://registry.npmjs.org
- 将
strict-ssl设置为false - 使用
npm cache clean清除 npm 的缓存
我没有选择
【问题讨论】:
标签: node.js proxy npm tunneling