1.设置使用淘宝npm
npm config set registry https://registry.npm.taobao.org
2.查看是否配置成功,成功后即可直接使用npm命令
npm config get registry
3.还原npm仓库
npm config set registry https://registry.npmjs.org
npm config set registry https://registry.npm.taobao.org
npm config get registry
npm config set registry https://registry.npmjs.org