关于前端:npm和yarn的镜像源的查看与修改

15次阅读

共计 385 个字符,预计需要花费 1 分钟才能阅读完成。

NPM

  • 查问以后镜像

    npm get registry 
  • 设置为淘宝镜像

    npm config set registry http://registry.npm.taobao.org/
  • 设置回默认的官网镜像

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

    Yarn

  • 查问以后镜像

    yarn config get registry
  • 设置为淘宝镜像

    yarn config set registry http://registry.npm.taobao.org/
  • 设置回默认的官网镜像

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

设置胜利都有相似上面的输入

yarn config v1.16.0
success Set “registry” to “http://registry.npm.taobao.org/”.
Done in 0.05s.

正文完
 0