安装cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
设置npm国内镜像
npm查询当前镜像地址
npm config get registry
npm 设置淘宝镜像
npm config set registry http://registry.npm.taobao.org/
npm 设置还原初始镜像地址
npm config set registry https://registry.npmjs.org/
安装yarn
下载yarn
https://yarn.bootcss.com/docs/install/#windows-stable // 下载地址
yarn查询当前镜像地址
yarn config get registry
yarn设置淘宝镜像
yarn config set registry http://registry.npm.taobao.org/