当前位置:网站首页>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 .
边栏推荐
- AcWing 243. A simple integer problem 2 (tree array interval modification interval query)
- [Key shake elimination] development of key shake elimination module based on FPGA
- In Net 6 CS more concise method
- Error 1045 (28000): access denied for user 'root' @ 'localhost' (using password: no/yes
- 【FPGA教程案例12】基于vivado核的复数乘法器设计与实现
- 【leetcode】22. bracket-generating
- MySQL about self growth
- Yyds dry goods inventory hcie security Day11: preliminary study of firewall dual machine hot standby and vgmp concepts
- 2/13 review Backpack + monotonic queue variant
- mysql关于自增长增长问题
猜你喜欢
Exchange bottles (graph theory + thinking)
TCP/IP协议里面的网关地址和ip地址有什么区别?
[001] [stm32] how to download STM32 original factory data
C form application of C (27)
C#(二十七)之C#窗体应用
10個 Istio 流量管理 最常用的例子,你知道幾個?
WPF效果第一百九十一篇之框选ListBox
C#(三十一)之自定义事件
Class A, B, C networks and subnet masks in IPv4
MySql数据库root账户无法远程登陆解决办法
随机推荐
Chinese brand hybrid technology: there is no best technical route, only better products
Class A, B, C networks and subnet masks in IPv4
[FPGA tutorial case 11] design and implementation of divider based on vivado core
math_极限&微分&导数&微商/对数函数的导函数推导(导数定义极限法)/指数函数求导公式推导(反函数求导法则/对数求导法)
Prime Protocol宣布在Moonbeam上的跨链互连应用程序
C mouse event and keyboard event of C (XXVIII)
自动化测试的好处
Benefits of automated testing
Yyds dry goods inventory hcie security Day11: preliminary study of firewall dual machine hot standby and vgmp concepts
Prime protocol announces cross chain interconnection applications on moonbeam
Tips for using dm8huge table
MySQL transaction isolation level
Global and Chinese market of plasma separator 2022-2028: Research Report on technology, participants, trends, market size and share
The global and Chinese market of negative pressure wound therapy unit (npwtu) 2022-2028: Research Report on technology, participants, trends, market size and share
Path of class file generated by idea compiling JSP page
KS003基于JSP和Servlet实现的商城系统
Introduction to data types in MySQL
潘多拉 IOT 开发板学习(HAL 库)—— 实验9 PWM输出实验(学习笔记)
C language -- structs, unions, enumerations, and custom types
Network security - Security Service Engineer - detailed summary of skill manual (it is recommended to learn and collect)