安装纱线时禁止纱线检查版本

时间:2019-12-30 05:48:20

标签: yarn yarnpkg yarn-workspaces

我在脱机计算机上运行yarn时,运行yarn add xxx的速度非常慢,因为它会从yarnpkg.com读取纱线版本。如何禁止这样做。

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".

1 个答案:

答案 0 :(得分:0)

  1. 使用选项--non-interactive
  2. 将选项disable-self-update-check添加到纱线配置文件中