1.查看当前镜像源
npm get registry
2.设置淘宝镜像源
npm config set registry http://registry.npm.taobao.org
3.设置官方镜像源
npm config set registry http://www.npmjs.org
4.国外镜像源,因为npm安装插件是从国外服务器下载,受网络的影响比较大,可能会出现异常
注意:发布组件库到NPM上时要用国外镜像源
npm config set registry http://www.cnpmjs.org