npm ERR! code ERR_SOCKET_TIMEOUT npm ERR! network Socket timeout 解决方法

npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! network Socket timeout
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

修改仓库镜像为https://registry.npmmirror.com/即可
npm ERR! code ERR_SOCKET_TIMEOUT npm ERR! network Socket timeout 解决方法_第1张图片

sunyongsheng@HUAWEI-MateBook-X-Pro cloud_class_vue % npm config get registry //查看当前镜像仓库
https://registry.npmjs.org/
sunyongsheng@HUAWEI-MateBook-X-Pro cloud_class_vue % npm config set registry https://registry.npmmirror.com
sunyongsheng@HUAWEI-MateBook-X-Pro cloud_class_vue % npm config get registry
https://registry.npmmirror.com/
sunyongsheng@HUAWEI-MateBook-X-Pro cloud_class_vue % npm i  

你可能感兴趣的:(npm,vue.js,前端)