[英]windows: npm install getting error ERR! code ECONNRESET
I try to install ionic, but when run npm install -g ionic
I have error below. 我尝试安装ionic,但是在运行
npm install -g ionic
出现以下错误。
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code ECONNRESET
npm ERR! network socket hang up
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 settin
gs.
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'
My network don't have proxy, and when i run npm get proxy
it said null
我的网络没有代理,当我运行
npm get proxy
它说为null
I already try to clean cache, and change registry to http://registry.npmjs.org/
and https://registry.npmjs.org/
and also I can access http://registry.npmjs.org/yo , but still have same error when installing ionic. 我已经尝试清理缓存,并将注册表更改为
http://registry.npmjs.org/
和https://registry.npmjs.org/
,并且我也可以访问http://registry.npmjs.org/yo ,但是在安装ionic时仍然有相同的错误。
hope any solution for my issue. 希望对我的问题有任何解决方案。
Thank you, 谢谢,
There is some dependency problem. 有一些依赖问题。
see below link : 见下面的链接:
http://ionicframework.com/docs/concepts/development.html http://ionicframework.com/docs/concepts/development.html
Improved answer Below :
改进的答案如下:
By default, brew install latest stable version of node (in this case 0.12.4).默认情况下,brew安装节点的最新稳定版本(在本例中为0.12.4)。 Based on the warning messages, ionic is expecting a lower version of node.
根据警告消息,ionic期望使用较低版本的节点。
I was able to to solve this issue by installing a prior version of node (0.10.38).通过安装节点的早期版本(0.10.38),我能够解决此问题。
$ brew remove node
$ rm ~/.node (might want to rename instead)
$ brew install homebrew/versions/node010
$ node --version
$ v0.10.38
Run npm install -g ionic worked as expected. 运行npm install -g ionic可以正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.