Switch between npm official source, Taobao source and Jingdong source

View the source address used

npm config get registry

 Switch from official source to Taobao source

npm config set registry https://registry.npm.taobao.org

 Switch Jingdong source from official source

npm config set registry http://jnpm.cbpmgt.com/

Switch from Taobao/JD/other sources to official sources

npm config set registry=http://registry.npmjs.org

Use Taobao's cnpm

npm install -g cnpm --registry=https://registry.npm.taobao.org

 

 

 

Guess you like

Origin blog.csdn.net/a1059526327/article/details/107511112