安装CNPM :
npm install -g cnpm --registry=https:
//registry.npm.taobao.org
将NPM的下载源也指向淘宝镜像地址
npm config set registry https://registry.npm.taobao.org
还源NPM下载源
npm config set registryhttps://registry.npmjs.org
配置后可通过下面方式来验证是否成功
npm config get registry
查看npm配置 :
npm config ls
修改npm全局安装路径 :
npm config set prefix "your path"