The NPM source is the server address that downloads the package that needs to be downloaded, and by default NPM----https://registry.npmjs.org/
Domestic small partners will find that foreign sources are too slow, so they will find the domestic Taobao source taobao-https://registry.npm.taobao.org/
The source of NPM can be modified with the nano ~/.NPMRC, but manual modifications are too laborious. Then there is the tool NRM, which can be used to manage the source from the command line.
Global Installation NRM
NPM Install- g NRM
View the NRM command
Nrm-h
➜~ nrm-h
USAGE:NRM [Options] [command]
Commands:
LS List all the Registries
Current Show Current Registry name
Use <registry> change registry to registry
Add <registry> <url> [home] Add one custom registry
Del <registry> Delete One custom registry
Home <registry> [Browser] Open the homepage of registry with optional browser
Test [Registry] Show response time for specific or all registries
Help Print this Help
Options:
-h,--help output usage information
-V,--version output the version number
the source on my computer is as follows:
NPM----https://registry.npmjs.org/
CNPM---http://r.cnpmjs.org/
* taobao-https://registry.npm.taobao.org/current NPM is using the source address
NJ-----https://registry.nodejitsu.com/
rednpm-http://registry.mirror.cqupt.edu.cn/
Npmmirror https://skimdb.npmjs.com/registry/
edunpm-http://registry.enpmjs.org/
Sinopia Http://100.XX.XX.XX:XXXX/sinopia for the company to build its own NPM warehouse
NRM's most frequent commands are:
1.nrm ls View existing source
2.NRM Add < Source name > < source address > new source
3.NRM Use < source name > switch to an existing source
4.NRM test speed