0

我在离线计算机上运行纱线,当我运行时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".

4

1 回答 1

0
  1. 使用选项--non-interactive
  2. disable-self-update-check向纱线配置文件添加选项
于 2020-12-07T04:28:41.523 回答