一、使用淘宝镜像
1.临时使用
npm --registry https://registry.npm.taobao.org install express

2.持久使用
npm config set registry https://registry.npm.taobao.org

3.通过cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org

二、使用官方镜像
npm config set registry https://registry.npmjs.org/

三、查看npm源地址
npm config get registry



作者:nickfox
链接:https://www.jianshu.com/p/f311a3a155ff
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

相关文章:

  • 2022-12-23
  • 2021-09-14
  • 2021-05-29
  • 2021-11-08
  • 2021-12-11
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-07
  • 2021-08-14
  • 2022-01-27
  • 2021-07-18
  • 2022-12-23
相关资源
相似解决方案