全局永久设置镜像源
npm config set registry https://registry.npmmirror.com/
临时在当前项目设置镜像源
npm install package-name --registry=https://registry.npmmirror.com/
对于yarn包管理器
yarn config set registry https://registry.npmmirror.com/
全局永久设置镜像源
npm config set registry https://registry.npmmirror.com/
临时在当前项目设置镜像源
npm install package-name --registry=https://registry.npmmirror.com/
对于yarn包管理器
yarn config set registry https://registry.npmmirror.com/