执行yarn install时报错info There appears to be trouble with your network connection. Retrying...成功解决方法

前言:yarn安装命令,出错解决方法

报错信息:yarn install
yarn install v1.22.21
[1/4] Resolving packages...
[2/4] Fetching packages...
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 Error: connect ETIMEDOUT 104.16.24.34:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

解决方案:取消SSL连接:yarn config set strict-ssl false

重试后成功安装

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
根据提供的引用内容,当执行yarn命令出现"info There appears to be trouble with your network connection. Retrying..."的提示,可能是网络连接出现问题导致的。解决这个问题的方法有以下几种: 1. 检查网络连接:首先,确保你的网络连接正常。可以尝试访问其他网站或使用其他网络连接来确认是否存在网络问题。 2. 检查代理设置:如果你使用了代理服务器来访问网络,可能需要检查代理设置是否正确。可以尝试在终端中运行以下命令来查看当前的代理设置: ```shell yarn config get proxy ``` 如果返回的结果不是你期望的代理设置,可以使用以下命令来修改代理设置: ```shell yarn config set proxy http://your-proxy-server:port ``` 将"your-proxy-server"替换为你的代理服务器地址,"port"替换为代理服务器的端口号。 3. 清除缓存:有候,缓存文件可能会导致网络连接问题。可以尝试清除yarn的缓存并重新执行命令。在终端中运行以下命令来清除yarn的缓存: ```shell yarn cache clean ``` 4. 检查yarn源:如果你使用了自定义的yarn源,可能需要检查源的可用性。可以尝试切换到官方的yarn源来解决网络连接问题。在终端中运行以下命令来切换到官方源: ```shell yarn config set registry https://registry.yarnpkg.com/ ``` 5. 更新yarn版本:如果你使用的是较旧的yarn版本,可能存在一些已知的网络连接问题。可以尝试更新yarn到最新版本来解决问题。在终端中运行以下命令来更新yarn: ```shell yarn self-update ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值