当前位置:网站首页>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 .
边栏推荐
- P3033 [usaco11nov]cow steelchase g (similar to minimum path coverage)
- Pandora IOT development board learning (HAL Library) - Experiment 9 PWM output experiment (learning notes)
- Class A, B, C networks and subnet masks in IPv4
- 【按鍵消抖】基於FPGA的按鍵消抖模塊開發
- 潘多拉 IOT 开发板学习(HAL 库)—— 实验9 PWM输出实验(学习笔记)
- Detailed explanation of serialization and deserialization
- [PSO] Based on PSO particle swarm optimization, matlab simulation of the calculation of the lowest transportation cost of goods at material points, including transportation costs, agent conversion cos
- Global and Chinese market of rubber wheel wedges 2022-2028: Research Report on technology, participants, trends, market size and share
- Cf603e pastoral oddities [CDQ divide and conquer, revocable and search set]
- Facebook and other large companies have leaked more than one billion user data, and it is time to pay attention to did
猜你喜欢
Ks003 mall system based on JSP and Servlet
Benefits of automated testing
C (XXIX) C listbox CheckedListBox Imagelist
How to modify field constraints (type, default, null, etc.) in a table
How to standardize the deployment of automated testing?
C#(二十七)之C#窗体应用
颠覆你的认知?get和post请求的本质
Exchange bottles (graph theory + thinking)
【PSO】基于PSO粒子群优化的物料点货物运输成本最低值计算matlab仿真,包括运输费用、代理人转换费用、运输方式转化费用和时间惩罚费用
Fundamentals of SQL database operation
随机推荐
[Zhao Yuqiang] deploy kubernetes cluster with binary package
记一次excel XXE漏洞
asp. Core is compatible with both JWT authentication and cookies authentication
Plus d'un milliard d'utilisateurs de grandes entreprises comme Facebook ont été compromis, il est temps de se concentrer sur le did
脚本生命周期
math_极限&微分&导数&微商/对数函数的导函数推导(导数定义极限法)/指数函数求导公式推导(反函数求导法则/对数求导法)
阿里测试师用UI自动化测试实现元素定位
Record the pit of NETCORE's memory surge
Global and Chinese markets for endoscopic drying storage cabinets 2022-2028: Research Report on technology, participants, trends, market size and share
WPF效果第一百九十一篇之框选ListBox
2/13 review Backpack + monotonic queue variant
Database, relational database and NoSQL non relational database
Determine which week of the month the day is
Facebook等大廠超十億用戶數據遭泄露,早該關注DID了
使用JS完成一个LRU缓存
Detailed explanation of serialization and deserialization
WPF effect Article 191 box selection listbox
Python book learning notes - Chapter 09 section 01 create and use classes
Introduction to data types in MySQL
P2648 make money