Switch Taobao mirror and foreign source
1. View the current mirror address in cmd:
npm get registry
2. Switch to Taobao image:
npm config set registry http://registry.npm.taobao.org/
3. Switch to the original npm image:
npm config set registry https://registry.npmjs.org/
2022 年更新 淘宝出了新域名地址
https://registry.npmmirror.com/
4. Install cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org