创建vue项目报错request to http://registry.npm.taobao.org/vue failed, reason: getaddrinfo ENOTFOUND registr
今天创建vue项目的时候报错了npm ERR! code ENOTFOUNDnpm ERR! errno ENOTFOUNDnpm ERR! network request to http://registry.npm.taobao.org/vue failed, reason: getaddrinfo ENOTFOUND registry.npm.taobao.orgnpm ERR! netwo
·
今天创建vue项目的时候报错了
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to http://registry.npm.taobao.org/vue 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\2020-06-23T03_50_59_975Z-debug.log
根据错误信息,应该是淘宝的镜像失效了,于是想换回以前的镜像
获取当前镜像
:>npm config get registry
http://registry.npm.taobao.org/
这是以前安装vue的时候设置的镜像,的确比不设置的时候快很多,
设置国外的镜像
npm config set registry http://registry.npmjs.org
然后再执行
npm install
不报错了,但是慢的要命,可能过几天淘宝的镜像又能用了,以后的事情以后再说
更多推荐
已为社区贡献15条内容
所有评论(0)