npm ERR! 安装 rev包 失败。
发布于 8 年前 作者 cuishunbiao 3641 次浏览 来自 问答

今天安装 npm install grunt-rev --save-dev 的时候出现错误,然后安装别的 包 也不能正常安装了。 下面是错误信息。 求解决方案。

npm ERR! Windows_NT 6.1.7601 npm ERR! argv “E:\node\\node.exe” “E:\node\node_modules\npm\bin\npm-cli.js” "install" npm ERR! node v0.12.0 npm ERR! npm v2.5.1 npm ERR! code ECONNRESET

npm ERR! network tunneling socket could not be established, cause=connect ECONNREFUSED 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! Please include the following file with any support request: npm ERR! E:\study\angular-phonecat\npm-debug.log

2 回复

问题已经解决。 上述问题(大概)是:因为国内防火墙屏蔽了外网。需要下载包文件,没有成功。所以报错。 解决方案: 在你安装的全局位置(比如:E盘),下运行 npm --registry https://registry.npm.taobao.org info underscore 此方法,(网络解决方案说)只是暂时解决。

下面是永久解决的方案。 编辑 ~/.npmrc 加入下面内容 registry = https://registry.npm.taobao.org

ECONNRESET就是网络问题 不过也可以安装nrm来切换源,更方便,而且还带测源网速的功能

回到顶部