Yarn install quits silently if fetching one package times out

Do you want to request a feature or report a bug?

What is the current behavior?
yarn install quits silently if fetching one of the packages times out during fetch phase due to package size and/or network lag.

  • yarn does quit before reaching linking phase, therefore no packages are installed
  • No error message
  • Return code 0

(Shortened) example output:

$ yarn install --verbose
yarn install v1.5.1
[1/4] Resolving packages...
warning: [...]
[2/4] Fetching packages...
verbose 1.45 Performing "GET" request to "https://registry.yarnpkg.com/envfile/-/envfile-2.3.0.tgz".
verbose 20.696 Performing "GET" request to "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.2.tgz".

If the current behavior is a bug, please provide the steps to reproduce.

  1. git clone https://github.com/theia-ide/theia-apps
  2. cd theia-apps/theia-java-docker
  3. mv next.package.json package.json
  4. yarn install

(Retry until it fails, maybe use slow internet connection)
The large package here is @theia/java, which clocks in at around 33MB.

What is the expected behavior?
yarn install prints an error message with the timeout, the package name and url it failed to fetch. Finally, it quits with a return code != 0.

Please mention your node.js, yarn and operating system version.

  • node 8.10
  • yarn 1.5.1
  • OS: docker image node:8.10
  • (Host: Ubuntu 16.04)

Maybe related: #5055

Update 2:
Neither increasing --network-timeout nor setting --mutex network helped. Interestingly, the yarn install quits long before the network timeout is due (e.g., timeout 60000ms, yarn install quits after 35s).

Update 3:
I noticed that in the cases where it fails locally (via docker run ...), my system monitor shows a very slow download (~150Kb/s on a 50 Mb/s connection). The other runs go with ~5 Mb/s).

Author: Fantashit

1 thought on “Yarn install quits silently if fetching one package times out

  1. Had this when running yarn v1.1.3.0 inside docker, after upgrading to v1.17.3 (nodejs 12.7.0), it behaves normal now.

Comments are closed.