yarn报错error An unexpected error occurred: "https://registry.yarnpkg.com...connect ETIMEDOUT...

yarn报错error An unexpected error occurred:
在使用yarn安装依赖包时报错,提示信息:error An unexpected error occurred: "https://registry.yarnpkg.com/killable/-/killable-1.0.0.tgz: connect ETIMEDOUT 104.16.19.35:443"
这是由于资源地址请求超时造成的,更换一下请求地址即可。

解决方案:

运行命令,把资源地址设置成npm淘宝源

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

附带问题:node-sass缓慢
yarn报错error An unexpected error occurred:
原因:代理出现了问题,删除之即可

解决方案:

npm config rm proxy 
npm config rm https-proxy

删除之后一切ok

对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

你可能感兴趣的:(个人心得,学习心得)