临时设置镜像源:

npm --registry https://registry.npm.taobao.org install express

永久设置镜像源:

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

查看镜像源设置状态

npm config get registry
npm info express

使用CNPM替代:

npm install -g cnpm --registry=https://registry.npm.taobao.org

NPM镜像源:

淘宝:https://npm.taobao.org/

发表评论