npm 查看当前源

npm get registry

npm 设置其他源

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

yarn 查看当前源

yarn config get registry

yarn 恢复(设置)默认源

yarn config set registry https://registry.yarnpkg.com

镜像源地址部分如下:

  1. npm — https://registry.npmjs.org/

  2. yarn — https://registry.yarnpkg.com/

先记录常用的,欢迎各位大佬补充