vue3项目yarn install遇到的info There appears to be trouble with your network connection.Retrying.·. 问题解决

新接手的vue3项目在安装依赖的时候经常下载失败,报错Couldn't find package ... on the "npm" registry 或者 error Error:read ECONNRESET
image

1. 可以改变当前的源

查看当前使用的源 yarn config get registry
改变源 yarn config set registry https://registry.npmmirror.com(推荐)
或 yarn config set registry https://registry.npm.taobao.org

2. 在.npmrc文件中添加配置

如果换源不能奏效,可以看下项目目录中是否有.npmrc这个文件
有的话要添加registry=https://registry.npmmirror.com这样一行

image

参考链接

https://www.cnblogs.com/caihongmin/p/18075763
https://www.cnblogs.com/qubernet/p/17900506.html

posted @   卡利的亲爹  阅读(58)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· .NET10 - 预览版1新功能体验(一)
点击右上角即可分享
微信分享提示