yarn安装报错网络问题解决方案

yarn安装报错网络问题解决方案

报错为

info There appears to be trouble with your network connection. Retrying...

解决方案:

更换安装依赖的镜像,使用淘宝镜像安装

  1. 安装好后更换淘宝镜像

yarn config set registry https://registry.npm.taobao.org

  1. 移除原代理

yarn config delete proxy
npm config rm proxy
npm config rm https-proxy

  1. 安装cnpm镜像并使用代理registry
  • 安装cnpm镜像

npm install -g cnpm --registry=https://registry.npm.taobao.org

  • 使用代理registry

npm config set registry https://registry.npm.taobao.org

解决!

类似情况

  1. 删除代理

yarn config delete proxy

  1. 设置淘宝镜像

yarn config set registry https://registry.npm.taobao.org/

  1. 设置超时时间

yarn install --network-timeout 6000

超时时间是毫秒单位

posted @   Lyc1cccccccc  阅读(444)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
点击右上角即可分享
微信分享提示