yarn安装依赖包报错,error An unexpected error occurred: “https://registry.npm.taobao.orgnpm/element-ui: getaddrinfo ENOTFOUND registry.npm.taobao.orgnpm registry.npm.taobao.orgnpm:443”.
这是因为网络不好导致的下载依赖包请求超时报错,更改下载地址即可。
解决:步骤1.请求地址设置成淘宝源
npm config set registry https://registry.npm.taobao.org
npm config set disturl https://npm.taobao.org/dist
步骤2.对node-sass镜像源进行设置
yarn config set sass-binary-site http://npm.taobao.org/mirrors/node-sass
步骤3.重新下载