使用npm安装任何包,安装半天进度条一动不动最后超时错误。
npm install nrm -g
npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npm.taobao.org/jsprim failed, reason: connect ETIMEDOUT 36.158.205.19:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network ‘proxy’ config is set properly. See: ‘npm help config’
npm ERR! A complete log of this run can be found in:
npm ERR! D:\my_apps\nodeJS\node_cache_logs\2022-04-18T06_53_14_782Z-debug-0.log
查来查去node都换了几个版本,path路径,npm配置都没用。结果一切的原因只是淘宝镜像换了新域名……
直接搜索报错信息,排在前列的一切解决方法都是用的旧域名,导致始终解决不了问题。
淘宝镜像现官网:http://www.npmmirror.com/
终端输入:
npm config set registry https://registry.npmmirror.com/
即可体验快速装包
npm安装包超时错误解决:淘宝镜像域名变更
博客讲述了在使用npm安装包时遇到的ETIMEDOUT超时错误,原因是未更新淘宝npm镜像的新域名。通过设置registry为https://registry.npmmirror.com/可以解决此问题,确保快速安装包。
6099

被折叠的 条评论
为什么被折叠?



