如何解决npm install 的报错npm ERR! network request to http://registry.cnpmjs.org/vue-cli failed

如何解决npm install 的报错npm ERR! network request to http://registry.cnpmjs.org/vue-cli failed

报错:

npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! ***work request to http://registry.***pmjs.org/vue-cli failed, reason: getaddrinfo ENOTFOUND registry.***pmjs.org
npm ERR! ***work This is a problem related to ***work connectivity.
npm ERR! ***work In most cases you are behind a proxy or have bad ***work settings.
npm ERR! ***work 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A ***plete log of this run can be found in:
npm ERR!     C:\Users\acer\AppData\Local\npm-cache\_logs\2022-08-07T07_18_12_778Z-debug-0.log

解决方法:
npm ERR! ***work request to http://registry.***pmjs.org/vue-cli failed, reason: getaddrinfo ENOTFOUND
这句话已经很明显的提示 http://registry.***pmjs.org/vue-cli 请求失败了,但网上其他博客还是让代理这个路径。试了网上很多方法都没有用。最后执行了以下语句,执行成功

npm config set registry https://registry.npm.taobao.org

直接代理淘宝镜像。
问题解决

转载请说明出处内容投诉
CSS教程_站长资源网 » 如何解决npm install 的报错npm ERR! network request to http://registry.cnpmjs.org/vue-cli failed

发表评论

欢迎 访客 发表评论

一个令你着迷的主题!

查看演示 官网购买