报错截图如下
报错代码如下
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.yarnpkg.com/@babel/runtime/-/runt
ETIMEDOUT 104.16.30.34:443".
标题具体解决及排查方案
1.yarn版本问题,截止排查时间官网给出的稳定版本是v1.22.17,注意检查一下自己的node版本
卸载安装固定版本yarn
npm uninstall -g yarn
npm install -g yarn@1.22.17
2.配置文件问题,可正常yarn install的配置如图
具体操作如下:
① 检查配置文件
yarn config list
② 手动更新配置文件
yarn config set registry https://registry.npm.taobao.org
npm config set registry https://registry.npm.taobao.org
npm config set disturl https://npm.taobao.org/dist
npm config set 'https://registry.npmjs.org/'
③ 删除无用配置项
yarn config delete 配置项名
npm config delete 配置项名
如果这套解决方案也对你有帮助,点个赞❥(^_-)支持一下啦