yarn install 报错【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...
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版本
node v1.22.17

卸载安装固定版本yarn
npm uninstall -g yarn
npm install -g yarn@1.22.17

2.配置文件问题,可正常yarn install的配置如图
yarn 配置截图
具体操作如下:

① 检查配置文件
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 配置项名

如果这套解决方案也对你有帮助,点个赞❥(^_-)支持一下啦

  • 4
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值