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


在使用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缓慢

原因:代理出现了问题,删除之即可

解决方案:

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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM