repack-examples
repack-examples copied to clipboard
yarn failing with ENOENT: no such file or directory
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.
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.
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