NRM Switching NPM sources

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.