【问题标题】:forbid yarn check version when yarn install安装纱线时禁止纱线检查版本
【发布时间】:2019-12-30 05:48:20
【问题描述】:

我在离线计算机上运行yarn,当我运行yarn add xxx时很慢,因为它从yarnpkg.com读取yarn版本。如何禁止这个。

success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ typescript@3.7.4
info All dependencies
└─ typescript@3.7.4
Done in 4.82s.
info There appears to be trouble with your network connection. Retrying...
verbose 23.339149829 Performing "GET" request to "https://yarnpkg.com/latest-version".
info There appears to be trouble with your network connection. Retrying...
verbose 46.36636041 Performing "GET" request to "https://yarnpkg.com/latest-version".
info There appears to be trouble with your network connection. Retrying...
verbose 69.392200426 Performing "GET" request to "https://yarnpkg.com/latest-version".
info There appears to be trouble with your network connection. Retrying...
verbose 92.418733958 Performing "GET" request to "https://yarnpkg.com/latest-version".

【问题讨论】:

    标签: yarnpkg yarn-workspaces


    【解决方案1】:
    1. 使用选项--non-interactive
    2. 在纱线配置文件中添加选项disable-self-update-check

    【讨论】:

    • 谢谢。 yarn config set disable-self-update-check true
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-02-20
    • 1970-01-01
    • 2020-04-03
    • 2021-04-28
    • 1970-01-01
    • 2019-02-09
    • 2022-08-16
    相关资源
    最近更新 更多