npm add source and switch source

nrm is a mirror source management tool for npm. Sometimes foreign resources are too slow. Use this to quickly switch between npm sources.

Install nrm globally

npm install -g nrm

nrm lsView the sources that have been added so far.
insert image description here
Sometimes we need to create our own npm mirror source. The company has its own npm address. Many dependencies are added
in the company's package address.

nrm add <镜像源名称(随便起)>  <镜像源url地址>

eg

nrm add zhangsan https://r.cnpmjs.org

Switch to the added mirror source

nrm use xxx

Guess you like

Origin blog.csdn.net/zm_miner/article/details/125079415