Skip to content
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 failing with ENOENT: no such file or directory #12

Open
jtwigg opened this issue Jan 11, 2024 · 2 comments
Open

yarn failing with ENOENT: no such file or directory #12

jtwigg opened this issue Jan 11, 2024 · 2 comments

Comments

@jtwigg
Copy link

jtwigg commented Jan 11, 2024

Environment

I can't get a clean yarn to successfully run.
Running with yarn 3.2.1

Its failing with

➤ YN0001: │ Error: ENOENT: no such file or directory, lstat '/Users/johntwigg/development/external/repack-examples/module-federation/module1/node_modules/node-gyp/bin'

Description

I cannot clean install this repo with yarn 3.2.1
I've been tearing my hair out.

Is it YARN thats broken? Is the the checked in files?

Reproducible Demo

Its on a clean install... so this repo.

@john-twigg-ck
Copy link

I had to run this to get it to work:

rm -rf node_modules **/node_modules
rm -rf yarn.lock **/yarn.lock
yarn cache clean
yarn install

something in your node_modules/.yarn-state.yml is toxic I believe.

@leotm
Copy link

leotm commented Mar 25, 2024

i had similar Yarn error in the final Link step with chalk

// ...
➤ YN0000: ┌ Link step
➤ YN0001: │ Error: While cloning .../node_modules/chalk -> .../swc/node_modules/chalk ENOENT: no such file or directory, scandir '.../node_modules/chalk'
➤ YN0000: └ Completed in 9s 677ms
➤ YN0000: Failed with errors in 14s 312ms
rm node_modules/.yarn-state.yml # seems to be enough
Screenshot 2024-03-25 at 2 12 10 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants