When learning Node, I learned that the default download address of NPM is abroad, so the download speed is slow in China. So try using the third-party module NRM, using the following steps:

1. Run NPM install NRM -g to download the file.

2. Query the available download address list: NRM ls.

3. Switch the NPM download address: NRM use Download address name.

Problems encountered while downloading NRM: Long stay: WARN deprecated [email protected]: Request has been deprecated

The main problem when resources in foreign countries, need to download the domestic mirror, configure taobao mirror:

npm config set registry https://registry.npm.taobao.org
Copy the code

Check whether the configuration is successful:

npm config get registry

Reinstall (-g indicates global):

npm install nrm -g
Copy the code

If the problem is solved successfully, run the NRM ls command to view the download and current usage:Use the image name to switch: