0


npm安装、切换淘宝镜像

npm默认镜像源是国外的,安装依赖速度较慢,使用国内的镜像源速度会快一些。

1、设置淘宝镜像源:

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

2、查看当前镜像源:

  1. npm config get registry

3、设置官方镜像源:

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

还可以使用nrm查看和切换镜像

  1. //安装nrm,一定要全局安装
  2. npm install -g nrm
  3. //nrm查看所有镜像源命令,带*即为当前使用的源
  4. nrm ls
  5. npm ---------- https://registry.npmjs.org/
  6. yarn --------- https://registry.yarnpkg.com/
  7. tencent ------ https://mirrors.cloud.tencent.com/npm/
  8. cnpm --------- https://r.cnpmjs.org/
  9. * taobao ------- https://registry.npmmirror.com/
  10. npmMirror ---- https://skimdb.npmjs.com/registry/
  11. //如果使用nrm ls发现全面都没有带*,则可以参考最后面的教程
  12. //切换镜像源命令
  13. nrm use xxx //例:nrm use taobao 就可以切换自己想用的镜像源了
  14. //当前使用的源
  15. nrm current
  16. taobao
标签: css 前端 css3

本文转载自: https://blog.csdn.net/Achong999/article/details/127397533
版权归原作者 也有1點儿想你 所有, 如有侵权,请联系我们删除。

“npm安装、切换淘宝镜像”的评论:

还没有评论