-
Notifications
You must be signed in to change notification settings - Fork 29
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
[BUG] EMFILE error in environment with low file descriptors limit #261
Comments
I'm not familiar with the npm codebase, but I was able to fix this issue by adding retries here: https://github.com/npm/cacache/blob/main/lib/put.js#L69. I'd be happy to submit a PR if you think this is a viable approach. |
What about updating the library to use I don't know if there is a performance reason |
I fixed this issue by using There is also example of custom implementation using only p-limit package prismicio/slice-machine#1192. |
Is there an existing issue for this?
Current Behavior
EMFILE error may be thrown during
npm install
, depending on the allowed file descriptors and the state of the cache before the install. An example error:Expected Behavior
npm install
should succeed.Steps To Reproduce
(The error happens reliably with nuxt, but it's not related to nuxt, you can use other packages and get the same result.)
ulimit -Hn 128
(It's possible to get the error with a higher ulimit, but using a low value helps to reliably reproduce the error)rm -rf /<home-dir>/.npm/_cacache/
rm -rf node_modules
npm install
(Reset ulimit using
ulimit -Hn unlimited
)Environment
The text was updated successfully, but these errors were encountered: