项目场景:
安装vue-router,elementui遇到问题
问题描述
提示:这里描述项目中遇到的问题:
npm ERR! code ENOTFOUND npm ERR! network request to
http://registry.cnpmjs.org/vue-router failed, reason: getaddrinfo
ENOTFOUND registry.cnpmjs.org 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’
原因分析:
提示:这里填写问题的分析:
主要是说 http://registry.cnpmjs.org
镜像找不到,所以要换一个,换成淘宝镜像
解决方案:
提示:这里填写该问题的具体解决方案:
npm config set registry http://registry.npm.taobao.org/
如果还是不行那先清理一下
npm config set proxy null
参考http://www.manongjc.com/detail/28-yaunrchpqnzkeei.html