// 查看当前镜像源 npm config get registry
npm install package_name --registry https://registry.npm.taobao.org
npm config set registry https://registry.npm.taobao.org
npm install -g cnpm --registry=https://registry.npm.taobao.org
全局安装cnpm,使用cnpm安装node
// 全局安装 nrm npm install -g nrm --registry=https://registry.npm.taobao.org // 查看能够使用的镜像列表 nrm ls // 使用淘宝镜像源 nrm use taobao
编辑.npmrc指定全局镜像源或局部镜像源npm
// 全局镜像源 registry =https://registry.npm.taobao.org // 局部镜像源 sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ 评论 ( 0 )