1. 查看当前源
npm config get registry
2. 更换npm源为国内淘宝镜像
npm config set registry http://registry.npm.taobao.org/
3. 更换npm源为国内npm官方镜像
npm config set registry http://registry.cnpmjs.org/
4. 还原npm源
npm config set registry https://registry.npmjs.org/标签:npm,set,更换,registry,org,config From: https://www.cnblogs.com/leonliuo/p/16735514.html