Change foreign address to domestic address (Ali)

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

And CNPM distinction

CNPM installation package looks messy, the path may be messy, directly change the NPM address will not exist this problemCopy the code

Bring new problems

Release NPM package will fail when need to go back to release (ha ha ha ha ~ ~ ~) NPM config set registry https://registry.npmjs.org yarn config set registry https://registry.yarnpkg.comCopy the code

Quick address switching tool [NRM]

The installation

 npm i nrm -g
Copy the code

use

NRM ls Displays the list of switchable addresses and the current address

NRM use [name] Switches to the changed IP address

! [](https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/dfbc885ca8f1438abd9508e4721f0e51~tplv-k3u1fbpfcp-zoom-1.image)Copy the code