报错:
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
直接代理淘宝镜像。
问题解决