npm yarn 安装依赖报错,显示proxy什么的,解决办法
An unexpected error occurred: “https://regisrty.npm.taobao.org/yarn: getaddrinfo ENOTFOUND regisrty.npm.taobao.org”.
If you are behind a proxy,please make sure that the proxy cinfig is set property.
这个是安装依赖报的错误信息,提示找不到这个源地址,还说使用了代理 proxy
一开始通过清空代理,重新设置代理都没用
npm config rm proxy
npm config rm https-proxy
// 清空默认代理
npm config set proxy null
后面通过重新设置源地址解决了
运行命令,把资源地址设置成npm淘宝源
npm config set registry https://registry.npm.taobao.org
npm config set disturl https://npm.taobao.org/dist
对node-sass镜像源进行设置
yarn config set sass-binary-site http://npm.taobao.org/mirrors/node-sass
npm config set sass-binary-site http://npm.taobao.org/mirrors/node-sass