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

  • 相关阅读:
    hadoop入门学习系列之一hadoop伪分布式模式下安装及运行
    redis主从复制搭建
    Struts2 配置文件result的name属性和type属性
    context:exclude-filter spring事宜【经典-转】
    Incorrect column count: expected 1, actual 2
    SQL must not be null(低级错误)
    Injection of resource dependencies failed解决办法总结
    SpringMVC Controller 介绍【转】
    Json格式化工具 JsonViewer下载
    STS或eclipse安装SVN插件
  • 原文地址:https://www.cnblogs.com/yasepix/p/11976068.html
Copyright © 2011-2022 走看看