npm install 时 会报以下错误,npm其他指令可以正常运行:

npm ERR! FetchError: request to
https://registry.npm.taobao.org/vue-loader failed, reason: connect
ECONNREFUSED 127.0.0.1:1181
在这里插入图片描述

一、先查看目前npm配置:

npm config list

是否如下所示:
在这里插入图片描述
二、如果配置与上图不同需要进行以下配置:

将源设置为淘宝源:

npm config set registry https://registry.npm.taobao.org

将代理设置为空:

npm config set proxy null
npm config set https-proxy null

三、重新 npm install 即可

Logo

Vue社区为您提供最前沿的新闻资讯和知识内容

更多推荐