简体   繁体   English

Windows:npm install得到错误ERR! 代码ECONNRESET

[英]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.

相关问题 在Windows 10上无法使用'npm install'(错误代码ECONNRESET) - Unable to use 'npm install' on Windows 10 (error code ECONNRESET) 出现错误 npm ERR! 运行 npm 时安装代码 EUNSUPPORTEDPROTOCOL - Getting error npm ERR! code EUNSUPPORTEDPROTOCOL while running npm install 由于npm ERR,在CircleCI上npm install -g dredd @ stable失败! 代码ECONNRESET - npm install -g dredd@stable fails on CircleCI due to npm ERR! code ECONNRESET 获得“npm ERR! 代码EPEERINVALID“在npm包全局安装 - Getting “npm ERR! code EPEERINVALID” on npm packages global install npm install -g 失败,得到 npm 错误! 代码 EACCES - npm install -g failing, getting npm ERR! code EACCES npm install 出现错误,因为 npm ERR cb() 从未调用过 - Getting error on npm install as npm ERR cb() never called NPM安装错误错误:“ npm ERR! 代码EINVAL” - NPM Install Error Woes: “npm ERR! code EINVAL” npm 安装给出'npm ERR! 代码 ENOTFOUND' 错误 - npm install gives 'npm ERR! code ENOTFOUND' error 在运行 npm install 时获取“npm ERR!code ELIFECYCLE npm ERR!errno 126” - Getting "npm ERR! code ELIFECYCLE npm ERR! errno 126" while running npm install 运行 npm install npm ERR 时出错! 代码 EJSONPARSE - Error running npm install npm ERR! code EJSONPARSE
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM