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