npm 不工作 - “读取 ECONNRESET" [英] npm not working - "read ECONNRESET"
本文介绍了npm 不工作 - “读取 ECONNRESET"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在使用 npm 时遇到问题,我无法安装任何东西.以下是错误消息:
I'm having a problem with npm, I cant install anything. Here is the error messages:
C:Windowssystem32>npm install -g yo
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
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'
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:Windowssystem32
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:Windowssystem32
pm-debug.log
npm ERR! not ok code 0
知道这是为什么吗?这是我的网络设置,似乎我没有配置任何代理.我还禁用了所有防火墙.
Any idea why is this? Here are my network settings and it seems I dont have any proxy configured. I also disabled all the firewalls.
推荐答案
使用
npm config set registry http://registry.npmjs.org/
以便 npm 请求 http
url 而不是 https
.
so that npm requests for http
url instead of https
.
然后尝试相同的 npm install
命令
and then try the same npm install
command
这篇关于npm 不工作 - “读取 ECONNRESET"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文