(转载)解决 npm i 及 yarn install 都无法进行安装的问题和node-sass安装太慢的问题

不问归期 提交于 2019-11-26 17:37:25

转载自:https://blog.csdn.net/tyro_java/article/details/79772442


发现问题

info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.npm.taobao.org/autoprefixer: tunneling socket could not be established, cause=connect ETIMEDOUT 10.129.49.21:8080".
  • 1
  • 2
  • 3
  • 4
  • 5

经过沉着冷静的思考后,分析关键词:tunneling socket could not be established

通过百度和Google搜索引擎的帮助,终于发现了解决方案

解决方案

代理出现了问题,删除之

npm config rm proxy 
npm config rm https-proxy
  • 1
  • 2

删除之后一切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
  • 1
  • 2
  • 3

参考链接


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!