-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yarn install fails with ENOENT: no such file or directory
occasionally
#2629
Comments
Interesting, so it only fails on Travis, but works when testing locally? That's very weird given Docker is supposed to ensure the environment is consistent. |
@Daniel15 I know right... I've downgraded node to version 6 and it still fails on Travis. I've added the
I am open to ideas on how to debug this. |
Downgrading to yarn 0.18.1 seemed to fix this for me. Seems like 0.19 might have a regression; see #1834 |
I also have this problem with yarn 0.23.3, it's happening not when building an image but simply when running some CI.
I think there may be some strange way of doing remove of files… Important point: the cache was empty! |
And on my machine, if I try to repro, I get this:
|
And with yarn 0.21.2:
That's terrible! |
And I concur with @twooster about 0.18.1 working ok! |
@Daniel15 it doesn't work locally either. Actually, it NEVER work when the cache is empty for me! |
@victornoel the recent error could be #2714 |
@bestander I did try 0.19.1 at the time and it didn't work… I retried, and now the bug:
So I don't think it is the same, let's hope you can reproduce it at least… |
(actually, I just tried again and reproduced the bug with an empty cache and yarn 0.21.2 while it wasn't the case before, maybe there is another file somewhere else that is the source of this problem, and that is not in the cache?) |
@bestander I will still test yarn as soon as #2744 is available as a nightly build :) |
Ping me if I can help. |
@bestander well, nope, I still get errors such as:
or:
I will see if I can make an e2e test. |
@bestander anyway I can get a complete stacktrace of the error? I only see this in the yarn-error.log:
That's a bit useless :) |
the detailled error is:
Not sure exactly what to do with this… it's happening at |
It seems stupid, but I feel like it fails only when my networked npm mirror (a sonatype nexus in my company) has mirrored the If I remove the artefact from the nexus mirror by hand, it works! So… it is a bit like yarn can't keep up if things arrive too fast ^^ because when I use the normal npm registry without using my mirror, things usually goes well (we have a slow internet connection). That's a bit of stretch to conclude that, but it could help find the origin of the problem. For the record, I think the error is emanating from |
Thanks for researching more, @victornoel, you might be on something here. |
I can repro scenario from #2629 (comment). I get
However if I just try Update:
|
Some help investigating why untaring those few dependencies (in my case typescript and angular-core) causes error is welcome. |
@victornoel, can you reproduce the bug with |
@bestander with |
The default is 15, I can repro the issue with concurrency 15 with a clean checkout of |
Excellent news! One step further toward a solution AND a workaround :) |
Some results. TL;DR I am out of ideas how to properly fix it for good, this needs some deeper Node.js knowledge.
The issue is in unzip/untar stream in tarball-fetcher code.
I think core-4.0.0 and typescript-2.2.1 fail because they have quite a few files and deep folder structures, and they fail to install while making many concurrent mkdir/copy operations. Every time there is a different syscall that fails: chmod, rmdir, mkdir, lstat, utime. And it is not something obvious in the libraries' code.
5.1. Using offline-mirror (no download), on my MBPro 13", clean cache and using 5.2. Using offline-mirror (no download), on my MBPro 13", clean cache and using 5.3. Downloading packages from internet, on my MBPro 13", clean cache and using Looks like setting concurrency to 8 is safe enough, also it makes sense to switch the tar library. |
May I ask if there is a solution in sight? We keep deleting 20 |
I personally have switched to lerna regarding workspace handling. |
Fairly sure that current Lerna simply passes-thru to Yarn. I was able to work-around my issues by adding a "nohoist": [
"**/ember-package/*ember*",
"**/ember-package/*ember*/**",
"**/ember-package/loader.js"
] |
I think we've got a minimal repro here now: #7212 (comment) |
Deleting |
Any news here? Our CI process just went down with all pipelines failing because of dependency installation failure from yarn. That's ridiculous. Setting |
@cadavre Not making any guarantees but this might not be a problem in v2, you can try it with
https://yarnpkg.com/getting-started/install#per-project-install |
This just started happening to me too, after upgrading some of my vue & firebase dependencies. Now 100% repeatable in my CI and dev machines. Adding |
I fixed it by temporarily changing cache directory, that I delete just afterwards. For me it's Docker build:
|
Closing as fixed in v2 where the cache has been greatly improved to avoid these sorts of issues |
* Update jest version * Retry install in circle CI to work around yarn bug - yarnpkg/yarn#2629
This is to see if we can workaround the issue where yarn can spawn more versions of itself, causing it to corrupt it's own tgz expansion See yarnpkg/yarn#6312 and yarnpkg/yarn#2629
The prepare script added by husky causes yarn to be re-entrant in its installs, which can lead to the same tarball being unpacked more than once at the same time, corrupting itself See yarnpkg/yarn#6312 and yarnpkg/yarn#2629
## Summary: The prepare script added by husky causes yarn to be re-entrant in its installs, which can lead to the same tarball being unpacked more than once at the same time, corrupting itself See yarnpkg/yarn#6312 and yarnpkg/yarn#2629 Issue: none ## Test plan: `yarn test` When we deploy to gcloud, it should deploy. Author: somewhatabstract Reviewers: jeresig Required Reviewers: Approved by: jeresig Checks: ✅ codecov/project, ✅ Test (macOS-latest, 12.x), ✅ Test (macOS-latest, 10.x), ✅ Test (ubuntu-latest, 10.x), ✅ Coverage (ubuntu-latest, 12.x), ✅ Publish to branch, ⏭ Auto-approve dependabot PRs, ✅ Lint and flow check (ubuntu-latest, 12.x) Pull request URL: #456
Running
yarn install
as part of a build step for a Docker image based onnode:7
fails on Travis CI withENOTEMPTY
,EEXISTS
errors. It always seems to error on thewebdriverio
package.When Travis runs
yarn install
as part of the install phase it works just fine. The error only happens when building a Docker image.Repo which reproduces this issue.
node:7
OS: Docker + Travis CI
yarn: 0.19.1
package.json
yarn.lock
I've tried installing yarn both with
npm install -g
and withapt
and both methods cause the failure on Travis.Weirdly enough, the image builds successfully on my local machine which runs Ubuntu 16.04.1 LTS with Docker version 1.13.0, build 49bf474.
The text was updated successfully, but these errors were encountered: