当前位置:网站首页>给yarn配置国内镜像加速器
给yarn配置国内镜像加速器
2022-04-23 05:43:00 【林仔520】
1. 查看当前使用的镜像源
yarn config get registry

这是国外镜像源,我们在下载一些包时可能因为乱七八糟原因下载不到,导致项目报错!
2. 修改镜像源
2.1 临时使用
yarn save 软件包名称 --registry https://registry.npm.taobao.org/
2.2 全局修改
yarn config set registry https://registry.npm.taobao.org/

3. 使用yrm切换yarn镜像源
yrm 是一个 yarn源管理器,允许你快速地在源间切换,它是 YARN registry manager的缩写
经常下载包的速度很忙有的还会卡住几十分钟,所以我们需要切换镜像
这样我们下载的速度会快很多
- 安装yrm
npm install -g yrm

- 列出当前可用的所有镜像源
yrm ls

带 * 号就表示你目前正在使用的镜像源
- 使用淘宝镜像源
yrm use taobao
- 测试访问速度
我们还可以利用yrm工具测试镜像的访问速度,例如测试淘宝镜像的访问速度
yrm test taobao

版权声明
本文为[林仔520]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_37955704/article/details/115065415
边栏推荐
- The role of brackets' [] 'in the parameter writing method in MDN documents
- 容器
- excel获取两列数据的差异数据
- 数据安全入门产品——数据库审计系统详解
- 热键,界面可视化配置(界面交互)
- 基于thymeleaf实现数据库图片展示到浏览器表格
- JVM系列(4)——内存溢出(OOM)
- Summary of redis classic interview questions 2022
- 第36期《AtCoder Beginner Contest 248 打比赛总结》
- Idea plug-in --- playing songs in the background
猜你喜欢

Excel sets row and column colors according to cell contents

手动删除eureka上已经注册的服务

字符串(String)笔记

MySQL lock mechanism

Pytorch deep learning practice_ 11 convolutional neural network

Package mall system based on SSM

JVM family (4) -- memory overflow (OOM)

Flutter nouvelle génération de rendu graphique Impeller

Flutter 新一代图形渲染器 Impeller

Isosceles triangle - the 9th Lanqiao provincial competition - group C
随机推荐
2-軟件設計原則
MySQL lock mechanism
Breadth first search topics (BFS)
Contract lock loophole
refused connection
Solid contract DoS attack
MySQL的锁机制
JDBC连接数据库
Strategy for improving the conversion rate of independent stations | recovering abandoned users
protected( 被 protected 修饰的成员对于本包和其子类可见)
多线程与高并发(1)——线程的基本知识(实现,常用方法,状态)
Idea plug-in --- playing songs in the background
Pilotage growth · ingenuity empowerment -- yonmaster developer training and pilotage plan is fully launched
io.lettuce.core.RedisCommandExecutionException: ERR wrong number of arguments for ‘auth‘ command
No.1.#_ 6 Navicat shortcuts
多线程与高并发(2)——synchronized用法详解
Radar equipment (greedy)
Total score of [Huawei machine test] (how to deal with the wrong answer? Go back once to represent one wrong answer)
C3P0数据库连接池使用
MDN文档里面入参写法中括号‘[]‘的作用