Skip to content

no such file or directory, lstat /YOUR_PROJECT/build/node_gyp_bins #3155

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

Closed
WillAvudim opened this issue Apr 22, 2025 · 0 comments
Closed

no such file or directory, lstat /YOUR_PROJECT/build/node_gyp_bins #3155

WillAvudim opened this issue Apr 22, 2025 · 0 comments

Comments

@WillAvudim
Copy link

If npm install runs into a mysterious lstat error (which happens during path.resolve, which is super-weird):

gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: ENOENT: no such file or directory, lstat '/YOUR_PROJECT/build/node_gyp_bins'

However your

$ /usr/local/bin/node /YOUR_PROJECT/node_modules/node-gyp/bin/node-gyp.js rebuild

succeeds just fine, then wiping out the cache under /home/USER/.cache/node-gyp (and delete /home/USER/.cache/node too while you're at it) resolves this unholy mess.

I'm leaving this here for posterity because I just spent around 2 hours debugging it, and I hope this message will save you time should find yourself in the same situation.

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

1 participant