question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug?]: yarn install error ENOENT: no such file or directory

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:20 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
larixercommented, Jan 4, 2022

@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

1reaction
penxcommented, Mar 14, 2022

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 using nodeLinker: node-modules and nmHoistingLimits: workspaces.

Would be great to get #3467 merged!

Read more comments on GitHub >

github_iconTop Results From Across the Web

yarn install fails with `ENOENT: no such file or directory ...
Running yarn install as part of a build step for a Docker image based on node:7 fails on Travis CI with ENOTEMPTY, EEXISTS...
Read more >
npm - Why does "yarn install" raise an ENOENT error when ...
I'm trying to migrate to Yarn. When I run yarn install in the console, it gives me an error: An unexpected error occurred:...
Read more >
Yarn install throwing errors - sage - Roots Discourse
Hi all. I'm getting an error when trying to set up Sage, and it's preventing me using Sage at all. yarn install v1.0.1...
Read more >
Yarn install fails - Feedback & Bug Reports - CircleCI Discuss
Yarn prints No lockfile found, although a yarn.lock file does exist: #! ... file appears to be corrupt: "ENOENT: no such file or...
Read more >
Common errors | npm Docs
Broken npm installation · Random errors · No compatible version found · Permissions errors · Error: ENOENT, stat 'C:\Users\<user>\AppData\Roaming\npm' on Windows 7 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found