npm设置镜像及恢复默认设置

npm淘宝镜像 

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

npm华为镜像

npm config set registry https://mirrors.huaweicloud.com/repository/npm/

全局安装cnpm并设置淘宝镜像

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

还原默认镜像

方法一:

npm config delete registry

方法二:

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

查看当前npm镜像

npm config get registry

你可能感兴趣的:(前端,npm,前端,node.js)