request to https://registry.npm.taobao.org/jsprim failed, reason: connect ETIMEDOUT 错误解决方案

安全、稳定、reproducible projects

Yarn 是一个软件包管理器,还可以作为项目管理工具。无论你是小型项目还是大型单体仓库(monorepos),无论是业余爱好者还是企业用户,Yarn 都能满足你的需求。
速度超快。

Yarn 缓存了每个下载过的包,所以再次使用时无需重复下载。 同时利用并行下载以最大化资源利用率,因此安装速度更快。

超级安全。

在执行代码之前,Yarn 会通过算法校验每个安装包的完整性。

超级可靠。

使用详细、简洁的锁文件格式和明确的安装算法,Yarn 能够保证在不同系统上无差异的工作。

你还在等什么?
离线模式

如果你以前安装过某个包,再次安装时可以在没有任何互联网连接的情况下进行。
确定性

不管安装顺序如何,相同的依赖关系将在每台机器上以相同的方式安装。
网络性能

Yarn 有效地对请求进行排队处理,避免发起的请求如瀑布般倾泻,以便最大限度地利用网络资源。
相同的软件包

从 npm 安装软件包并保持相同的包管理流程。
网络弹性

重试机制确保单个请求失败并不会导致整个安装失败。
扁平模式

将依赖包的不同版本归结为单个版本,以避免创建多个副本。
————————————————
版权声明:本文为CSDN博主「徐同保」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/xutongbao/article/details/123582314


yarn 设置镜像源新

http://www.npmmirror.com/

 

 

Windows PowerShell
版权所有(C) Microsoft Corporation。保留所有权利。

安装最新的 PowerShell,了解新功能和改进!https://aka.ms/PSWindows

PS D:\source\m-yuying-node> yarn config get registry
https://registry.npm.taobao.org
PS D:\source\m-yuying-node> yarn config set registry https://registry.npmmirror.com
yarn config v1.21.1
success Set "registry" to "https://registry.npmmirror.com".
Done in 0.49s.
PS D:\source\m-yuying-node> yarn config get registry
https://registry.npmmirror.com
PS D:\source\m-yuying-node> yarn
yarn install v1.21.1
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...
success Already up-to-date.
Done in 3.77s.
PS D:\source\m-yuying-node>

猜你喜欢

转载自blog.csdn.net/xutongbao/article/details/127902272
今日推荐