npm 不工作 - “网络错误无法重置”

npm not working - "network error failed to ECONNRESET"

提问人:Bilal Younus 提问时间:11/16/2023 最后编辑:user16217248Bilal Younus 更新时间:11/19/2023 访问量:44

问:

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

知道这是为什么吗?这是我的网络设置,似乎我没有配置任何代理。我还禁用了所有防火墙。您能否也提供一些解释,这将非常有帮助。

reactjs typescript npm-install package.json

评论

0赞 user207421 11/16/2023
他们的错误消息不正确。防火墙不会导致此问题。大多数情况下,接收应用程序不正确或未正确配置 SSL。
0赞 Akeel Ahmed Qureshi 11/16/2023
有时默认的 npm 注册表可能会有问题。您可以尝试切换到不同的注册表并更新您的 npm 版本,它看起来很旧。

答: 暂无答案