callstack / repack-examples

Repository with examples for Re.Pack
50 stars 20 forks source link

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

Open jtwigg opened 10 months ago

jtwigg commented 10 months ago

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 commented 10 months ago

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 commented 7 months ago

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