berry: [Bug?]: yarn install error ENOENT: no such file or directory
Self-service
- I’d be willing to implement a fix
Describe the bug
Duplicate of https://github.com/yarnpkg/yarn/issues/4563:
➤ YN0001: │ Error: ENOENT: no such file or directory, chmod ‘/my-user/my-repository/node_modules/a-package/node_modules/another-package’
To reproduce
I don’t have a reproduction path, but there is more than enough information in https://github.com/yarnpkg/yarn/issues/4563, as this is a duplicate.
Environment
System:
OS: macOS 11.5.1
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Binaries:
Node: 14.17.0 - /private/var/folders/1s/p6w4cpg94cj2_kbxlkbfrqqw0000gn/T/xfs-1d0a0a1f/node
Yarn: 2.4.1 - /private/var/folders/1s/p6w4cpg94cj2_kbxlkbfrqqw0000gn/T/xfs-1d0a0a1f/yarn
npm: 6.14.13 - ~/.volta/tools/image/node/14.17.0/bin/npm
npmPackages:
jest: 26.6.3 => 26.6.
Additional context
No solutions of the duplicate issue helped me, like using yarn install
instead of yarn
, or doing it multiple times (unless 10 times is not enough).
We have seen this occurring in our repository elsewhere too, but not everytime.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 6
- Comments: 20 (6 by maintainers)
@jgillick I need to write integration tests to change it to review status, hopefully I will find time to do this soon, perhaps this week
We ran in to this issue with 3.2.0 due to Netlify not restoring our cache correctly (we think) and then getting this issue during install.
Confirmed that
yarn set version from sources --branch 3467
fixes the issue for us when usingnodeLinker: node-modules
andnmHoistingLimits: workspaces
.Would be great to get #3467 merged!
@merceyz is the change only available if I’m using plug and play?
Unfortunately even with
nodeLinker
removed from my yarn config I’m running into the same issue.I can reproduce the error posted by @jgillick
I’m also getting random errors.
One way you might be able to reproduce it with this repo
From the root of the monorepo:
The output I get is:
This is happening for me too. Also on a closed-source repo. For me, it seems to be a race condition. At least, each time I run into it, it gets stuck on a different package.