第一种方式使用cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
使用 cnpm 命令来安装模块了(name模块名):
cnpm install name
第二种 配置 registry(推荐)
//设置
npm config set registry https://registry.npm.taobao.org
//查看
npm config get registry
第一种方式使用cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
使用 cnpm 命令来安装模块了(name模块名):
cnpm install name
第二种 配置 registry(推荐)
//设置
npm config set registry https://registry.npm.taobao.org
//查看
npm config get registry