npm 查看当前源
npm config get registry
npm config set registry https://registry.npm.taobao.org
安装cnpm yarn
npm install -g cnpm --registry=https://registry.npm.taobao.org
npm install -g yarn --registry=https://registry.npm.taobao.org
查看当前源
yarn config get registry
临时修yarn源
yarn save package_name --registry https://registry.npm.taobao.org/
修改yarn源为taobao源
yarn config set registry https://registry.npm.taobao.org/
修改yarn源为官方源
yarn config set registry https://registry.yarnpkg.com