npm install报错

错误描述

npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to http://registry.npm.taobao.org/axios failed, reason: getaddrinfo ENOTFOUND registry.npm.taobao.org
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'

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\nodejs\node_cache\_logs\2022-01-11T08_29_06_319Z-debug.log

解决方案

#查看当前镜像地址
npm config get registry
#切换镜像地址
//国外
npm config set registry http://registry.npmjs.org
//淘宝
npm config set registry http://registry.npm.taobao.org/
posted @ 2022-01-11 16:37  幸运刘  阅读(779)  评论(0编辑  收藏  举报