当前位置:网站首页>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 .
边栏推荐
- Hashcode and equals
- Ethernet port &arm & MOS &push-pull open drain &up and down &high and low sides &time domain and frequency domain Fourier
- TCP/IP协议里面的网关地址和ip地址有什么区别?
- asp. Core is compatible with both JWT authentication and cookies authentication
- Execution order of scripts bound to game objects
- Do you know cookies, sessions, tokens?
- Take you to wechat applet development in 3 minutes
- 登录mysql输入密码时报错,ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: NO/YES
- Viewing and verifying backup sets using dmrman
- [Key shake elimination] development of key shake elimination module based on FPGA
猜你喜欢
What is the difference between gateway address and IP address in tcp/ip protocol?
In Net 6 CS more concise method
Path of class file generated by idea compiling JSP page
Facebook and other large companies have leaked more than one billion user data, and it is time to pay attention to did
ESP32(基于Arduino)连接EMQX的Mqtt服务器上传信息与命令控制
C (XXIX) C listbox CheckedListBox Imagelist
Proof of Stirling formula
20、 EEPROM memory (AT24C02) (similar to AD)
MySql数据库root账户无法远程登陆解决办法
【可调延时网络】基于FPGA的可调延时网络系统verilog开发
随机推荐
Web components series (VII) -- life cycle of custom components
自动化测试怎么规范部署?
MySql数据库root账户无法远程登陆解决办法
No qualifying bean of type ‘......‘ available
Proof of Stirling formula
Take you to wechat applet development in 3 minutes
Python book learning notes - Chapter 09 section 01 create and use classes
潘多拉 IOT 开发板学习(HAL 库)—— 实验9 PWM输出实验(学习笔记)
MySQL about self growth
How does technology have the ability to solve problems perfectly
[Zhao Yuqiang] deploy kubernetes cluster with binary package
[adjustable delay network] development of FPGA based adjustable delay network system Verilog
脚本生命周期
【可调延时网络】基于FPGA的可调延时网络系统verilog开发
WPF效果第一百九十一篇之框选ListBox
2/13 qaq~~ greed + binary prefix sum + number theory (find the greatest common factor of multiple numbers)
How to modify field constraints (type, default, null, etc.) in a table
Tips for using dm8huge table
Python book learning notes - Chapter 09 section 01 create and use classes
Redis (replicate dictionary server) cache