首页 前端知识 报错:npm ERR! network request to https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz failed

报错:npm ERR! network request to https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz failed

2025-03-18 12:03:37 前端知识 前端哥 854 546 我要收藏

我们在集成终端输入命令npm install的时候报错:

npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz failed, reason:
npm ERR! network This is a problem 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'

当时这个项目搭建人在搭建的时候node版本为20.9.0,

我看了我这边的node版本并没有错,所以不是版本的问题

后来查询资料说使用淘宝镜像就可以了,所以我就试了试结果成功了!

以下命令:npm config set registry https://registry.npm.taobao.org

转载请注明出处或者链接地址:https://www.qianduange.cn//article/23962.html
标签
评论
发布的文章
大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!