запретить проверку версии пряжи при установке пряжи

Я запускаю пряжу на автономном компьютере, когда я запускаю yarn add xxx, она очень медленная, потому что она читает версию пряжи с yarnpkg.com.how, чтобы запретить это.

success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ [email protected]
info All dependencies
└─ [email protected]
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".


person meteor199    schedule 30.12.2019    source источник


Ответы (1)


  1. используя опцию --non-interactive
  2. добавить опцию disable-self-update-check в файл конфигурации пряжи
person Chester Yuan    schedule 07.12.2020
comment
благодарю вас. yarn config set disable-self-update-check true - person meteor199; 09.05.2021