修改 npm yarn 源

335 阅读1分钟
  1. 临时使用
npm --registry https://registry.npm.taobao.org install express

2.永久设置

npm config set registry https://registry.npm.taobao.org

3.官方源

npm config set registry https://registry.npmjs.org/
yarn config set registry https://registry.yarnpkg.com

4.查看当前源

npm config get registry