zoukankan      html  css  js  c++  java
  • npm yarn 设置镜像

    前端开发使用 npm 或者 yarn 下载过程中可能会下载非常慢甚至报错,我们可以配置国内 淘宝镜像 来解决这个问题。具体方法如下:

    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.
  • 相关阅读:
    我的期末可以加分项
    冲刺
    公司授课管理系统
    挑战赛题终于完成
    Java web 学习
    Java web 学习
    Javaweb 学习
    Base64加密
    选课系统
    Educational Codeforces Round 62题解
  • 原文地址:https://www.cnblogs.com/PasserByOne/p/14189156.html
Copyright © 2011-2022 走看看