zoukankan      html  css  js  c++  java
  • yarn配置阿里源

    1、查看一下当前源

    yarn config get registry

    2、切换为淘宝源

    yarn config set registry https://registry.npm.taobao.org
    yarn config set sass_binary_site "https://npm.taobao.org/mirrors/node-sass/"
    yarn config set phantomjs_cdnurl "http://cnpmjs.org/downloads"
    yarn config set electron_mirror "https://npm.taobao.org/mirrors/electron/"
    yarn config set sqlite3_binary_host_mirror "https://foxgis.oss-cn-shanghai.aliyuncs.com/"
    yarn config set profiler_binary_host_mirror "https://npm.taobao.org/mirrors/node-inspector/"
    yarn config set chromedriver_cdnurl "https://cdn.npm.taobao.org/dist/chromedriver"
    ————————————————
    版权声明:本文为CSDN博主「JSlow」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/qq_19107011/article/details/97992167

    改Yarn的全局安装和缓存位置

    在CMD命令行中执行
    1.改变 yarn 全局安装位置
    $ yarn config set global-folder "你的磁盘路径"
    1
    2.然后你会在你的用户目录找到 .yarnrc 的文件,打开它,找到 global-folder ,改为 --global-folder
    $ yarn config set global-folder "D:Softwareyarnglobal"
    1
    #这里是我的路径

    2. 改变 yarn 缓存位置
    #yarn config set cache-folder "你的磁盘路径"
    #这里是我的路径
    #在我们使用 全局安装 包的时候,会在 “D:Softwareyarnglobal” 下 生成 node_modules.bin 目录
    $ yarn config set cache-folder "D:Softwareyarncache"

    我们需要将 D:Softwareyarnglobal ode_modules.bin 整个目录 添加到系统环境变量中去,否则通过yarn 添加的全局包 在cmd 中是找不到的。

    检查当前yarn 的 bin的 位置
    $ yarn global bin
    1
    检查当前 yarn 的 全局安装位置
    $ yarn global dir

    王来彬
    发布了77 篇原创文章 · 获赞 144 · 访问量 12万+
    ————————————————
    版权声明:本文为CSDN博主「王来彬」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/alnorthword/article/details/97377677

  • 相关阅读:
    php的rabbitmq扩展(未测试)
    rabbitmq安装
    windows操作系统安装jdk以及配置环境变量
    chrome设置user-agent
    pycharm中快捷键ctrl+c,ctrl+v,ctrl+f失效问题解决
    chrome设置user agent
    Pycharm鼠标滚动控制字体大小
    mouse事件实现可拖拽的div
    DOM事件委托
    !heap 手动查询内存泄漏
  • 原文地址:https://www.cnblogs.com/yasepix/p/11976068.html
Copyright © 2011-2022 走看看