当前位置:网站首页>How to solve the problem of slow downloading from foreign NPM official servers—— Teach you two ways to switch to Taobao NPM image server
How to solve the problem of slow downloading from foreign NPM official servers—— Teach you two ways to switch to Taobao NPM image server
2022-07-06 04:07:00 【Concision.】
- Mirror image (Mirroring) It's a form of file storage , The data on one disk has an identical copy on another disk, that is, the image .
TaoBao
Set up a server in China , The package on the foreign official server Sync To domestic servers , And then provide the service of the next package in China , This greatly improves the speed of downloading packets .
Method 1
Switch npm The next package image source : Execute the following command at the terminal
- perform
npm config get registry
View the current package image source - perform
npm config set registry=http://registry.npm.taobao.org/
Switch the image source of the next package to Taobao image source . - perform
npm config get registry
Check if the switch is successful
Method 2
In order to switch the image source of the next package more conveniently , We can install nrm
This gadget , utilize nrm Terminal commands provided , You can quickly view and switch the image source of the next package .
- Carry out orders
npm i nrm -g
, adopt npm Package manager , take nrm Install as a globally available tool - Carry out orders
nrm ls
, View all available mirror sources - Carry out orders
nrm use taobao
, Switch the image source of the next package to taobao Mirror image .
边栏推荐
- Error 1045 (28000): access denied for user 'root' @ 'localhost' (using password: no/yes
- 2/11 matrix fast power +dp+ bisection
- Path of class file generated by idea compiling JSP page
- 1291_Xshell日志中增加时间戳的功能
- Redis (replicate dictionary server) cache
- The Research Report "2022 RPA supplier strength matrix analysis of China's banking industry" was officially launched
- Class A, B, C networks and subnet masks in IPv4
- asp. Core is compatible with both JWT authentication and cookies authentication
- Cf603e pastoral oddities [CDQ divide and conquer, revocable and search set]
- 自动化测试怎么规范部署?
猜你喜欢
KS008基于SSM的新闻发布系统
[disassembly] a visual air fryer. By the way, analyze the internal circuit
C language -- structs, unions, enumerations, and custom types
Detailed explanation of serialization and deserialization
C (XXIX) C listbox CheckedListBox Imagelist
Solution to the problem that the root account of MySQL database cannot be logged in remotely
Maxay paper latex template description
Record an excel xxE vulnerability
JVM的手术刀式剖析——一文带你窥探JVM的秘密
DM8 backup set deletion
随机推荐
软考 系统架构设计师 简明教程 | 总目录
Unity中几个重要类
自动化测试怎么规范部署?
Global and Chinese market of aircraft anti icing and rain protection systems 2022-2028: Research Report on technology, participants, trends, market size and share
【FPGA教程案例12】基于vivado核的复数乘法器设计与实现
In Net 6 CS more concise method
WPF效果第一百九十一篇之框选ListBox
Record the pit of NETCORE's memory surge
Yyds dry goods inventory hcie security Day11: preliminary study of firewall dual machine hot standby and vgmp concepts
Class A, B, C networks and subnet masks in IPv4
Stack and queue
Global and Chinese markets for MRI safe implants 2022-2028: technology, participants, trends, market size and share Research Report
Fundamentals of SQL database operation
P3033 [usaco11nov]cow steelchase g (similar to minimum path coverage)
2/11 matrix fast power +dp+ bisection
cookie,session,Token 这些你都知道吗?
图应用详解
Web components series (VII) -- life cycle of custom components
10个 Istio 流量管理 最常用的例子,你知道几个?
Leetcode32 longest valid bracket (dynamic programming difficult problem)