npm install时网络报错的问题


如果现在是taobao的镜像

npm config set registry http://registry.cnpmjs.org/

如果不是淘宝的镜像

npm config set registry https://registry.npm.taobao.org

先在CMD中运行这个 npm config set registry http://registry.cnpmjs.org/

然后在CMD中运行这个 npm install -g cnpm --registry=https://registry.npm.taobao.org