Retrying...error Error: connect ETIMEDOUT 104.16.27.34:443解决方法

1 篇文章 0 订阅
1 篇文章 0 订阅

yarn install v1.22.21
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[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.27.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

解决方法:

安装好 nodejs 与 yarn,下载项目后在项目主目录下运行 yarn 拉取依赖包时执行
npm install -g cnpm --registry=https://registry.npm.taobao.org

  • 9
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
回答: HTTP Error 504: Gateway Time-out是一个常见的错误,表示网关超时。这通常是由于服务器在请求的时间内没有收到响应而导致的。解决这个问题的方法有几种。引用\[1\]中提到的第一种方法是为urlopen设置timeout参数,这样可以在请求超时时抛出异常,避免程序卡死。另一种方法是使用retrying库,通过设置重试次数和重试间隔来处理异常,如引用\[2\]所示。这样可以在出现异常时自动重试请求,提高程序的稳定性。所以,你可以尝试在你的代码中使用这些方法解决HTTP Error 504: Gateway Time-out的问题。 #### 引用[.reference_title] - *1* *2* [Python爬取网页动态数据出现urllib.error.HTTPError: HTTP Error 504: Gateway Time-out问题](https://blog.csdn.net/sfwqwfew/article/details/127880014)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [Python学习笔记(二)urllib.urlopen()超时问题 : 504Gateway Time-out](https://blog.csdn.net/m0_37374307/article/details/80326715)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值