npm不工作

编程入门 行业动态 更新时间:2024-10-28 14:32:12
npm不工作 - “阅读ECONNRESET”(npm not working - “read ECONNRESET”)

我有一个npm的问题,我不能安装任何东西。 以下是错误消息:

C:\Windows\system32>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:\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

任何想法为什么会这样? 这是我的网络设置,似乎我没有配置任何代理。 我也禁用了所有的防火墙。

I'm having a problem with npm, I cant install anything. Here is the error messages:

C:\Windows\system32>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:\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

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 。

然后尝试使用相同的npm install命令

use

npm config set registry http://registry.npmjs.org/

so that npm requests for http url instead of https.

and then try the same npm install command

更多推荐

本文发布于:2023-08-06 06:40:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1445058.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:工作   npm

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!