1.临时使用

npm --registry https://registry.npm.taobao.org install 包名

2.永久设置为淘宝镜像

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

3.换回国外官方源

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

4.查看使用的源地址

npm config get registry
5.使用淘宝的cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org

 

相关文章:

  • 2022-01-13
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
  • 2021-07-16
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-11
相关资源
相似解决方案