Yarn: [integrity check broke] Always linking, never "up to date"

Created on 7 Mar 2017  ยท  11Comments  ยท  Source: yarnpkg/yarn

Yarn v0.21.3 on Windows 10.

Wild guess:

warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.

is causing "linking" dependencies on all runs of yarn making it slow.


Full details:

On most projects, the first yarn is slow as it downloads dependencies but subsequent yarns are fast, something like:

$ yarn
yarn install v0.21.3
[1/4] Resolving packages...
success Already up-to-date.
Done in 1.21s.

However, on one particular project, yarn is always slow, most of the time spent on "linking" dependencies:

$ yarn
yarn install v0.21.3
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 103.04s.

$ yarn
yarn install v0.21.3
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 72.80s.

$ yarn
yarn install v0.21.3
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 81.77s.

Perhaps related report in another issue: https://github.com/yarnpkg/yarn/issues/990#issuecomment-277531063.

Most helpful comment

steps to reproduce:

  1. create a new package.json in an empty folder
  2. yarn add chimp
  3. yarn install

You won't get:

[1/4] Resolving packages...
success Already up-to-date.
Done in 0.23s.

You'll get:

[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it
from installation.
[3/4] Linking dependencies...
โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 2142/14564โ–ˆ
[4/4] Building fresh packages...
Done in 20.30s.

$ yarn --version
0.21.3

$ node --version
v4.6.1

All 11 comments

Need repro steps please

steps to reproduce:

  1. create a new package.json in an empty folder
  2. yarn add chimp
  3. yarn install

You won't get:

[1/4] Resolving packages...
success Already up-to-date.
Done in 0.23s.

You'll get:

[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it
from installation.
[3/4] Linking dependencies...
โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 2142/14564โ–ˆ
[4/4] Building fresh packages...
Done in 20.30s.

$ yarn --version
0.21.3

$ node --version
v4.6.1

@mcissel beat me to it :) Sorry for not providing it in the first place.

Also getting this on Ubuntu with Yarn 0.21.3 and Node v6.9.5

I tried downgrading, but it's happening on versions as old as 0.17.4, and if I go older than that things start failing.

I can repro this.
Looks like integrity check is different at the beginning of install operation and at the end.
I'll work on this in the near future

The reason is in cucumber@github:xolvio/cucumber-js#v1.3.0-chimp.2 deeper in the tree, it gets partially initialized between resolve and fetch phases.
I am working on changing the content of integrity file, this should fix it.

I am also having this issue on 0.22 and I'm not quite sure how to resolve it

0.23.2 should have this fixed

@bestander
I'm seeing this behavior on 0.27.5. I run rm -rf node_modules && yarn and it does it in 28.29s. Then, if I do yarn, instead of showing Already up to date, it does the whole fetch/link process, but this time in just 7.56s. I have other projects in my system, but none of them have this issue. Do you have any pointers as to what could be the problem?

Try updating Yarn to latest version, we have fixed a lot since then

On Thu, May 17, 2018 at 2:36 AM Suhair Zain notifications@github.com
wrote:

@bestander https://github.com/bestander
I'm seeing this behavior on 0.27.5. I run rm -rf node_modules && yarn and
it does it in 28.29s. Then, if I do yarn, instead of showing Already up
to date, it does the whole fetch/link process, but this time in just 7.56s.
I have other projects in my system, but none of them have this issue. Do
you have any pointers as to what could be the problem?

โ€”
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/yarnpkg/yarn/issues/2859#issuecomment-389807004, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACBdWI0OplRZSgVIuwW-cOsl3kpnbGBvks5tzUSVgaJpZM4MVqGF
.

we updated to latest version 1.13.0 still giving that same error.

Was this page helpful?
0 / 5 - 0 ratings