转载自 https://www.cnblogs.com/jhwking/p/9790963.html
1. 查看当前计算机的下载地址
npm get registry
2. 修改为淘宝npm镜像
npm config set registry http://registry.npm.taobao.org/
3. 修改为cnpmjs镜像
npm config set registry http://r.cnpmjs.org/
4. 修改为原始地址
npm config set registry http://registry.npmjs.org/