npm不工作 - 安装angularjs2 cli时“读取ECONNRESET”

时间:2017-07-17 06:18:27

标签: javascript angularjs node.js npm

E:\Harish\Deploy>npm install -g @angular/cli
npm http GET https://registry.npmjs.org/yo
npm http GET https://registry.npmjs.org/yo
npm http GET https://registry.npmjs.org/yo
npm ERR! network read ECONNRESET



    And i also tried npm registery settings npm config set registry 
    http://registry.npmjs.org/
    
    But it didn't resolve my issue
    
    Any Idea About this?How to overcome this proxy connection settings 




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.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program 
Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yo"
npm ERR! cwd C:\Windows\system32
npm ERR! node -v v0.10.17
npm ERR! npm -v 1.3.8
npm ERR! syscall read
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Windows\system32\npm-debug.log
npm ERR! not ok code 0

And i also tried npm registery settings npm config set registry 
http://registry.npmjs.org/

我使用的是Node 8.1.3和npm 5.0.3。当我安装npm install -g @ angular / cli

我收到连接被拒绝和一些代理错误。我也在npm注册表中注册代理设置仍然得到相同的代理连接被拒绝错误请将错误图像作为附件发送。

如果您在代理服务器后面运行,请确保正确设置代理服务器配置

如何解决此问题?

npm ERR!网络如果您在代理服务器后面,请确保npm ERR!网络代理'配置设置正确。请参阅:' npm help config'

npm ERR!请在任何支持请求中包含以下文件:npm ERR! C:\ Windows \ System32下\ NPM-的debug.log

But it didn't resolve my issue

Any Idea About this?How to overcome this proxy connection settings 

1 个答案:

答案 0 :(得分:1)

npm install -g @angular/cli --registry=https://registry.npmjs.org

这适合我。