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

watch mode chokes due to file limit (Linux) #424

Closed
FND opened this issue Feb 27, 2018 · 1 comment
Closed

watch mode chokes due to file limit (Linux) #424

FND opened this issue Feb 27, 2018 · 1 comment
Labels

Comments

@FND
Copy link

FND commented Feb 27, 2018

On Linux, if node_modules gets a little bigger (which, of course, can happen quite easily), fractal start --watch throws an ENOSPC exception within chokidar:

Error: watch …/components ENOSPC
    at exports._errnoException (util.js:1020:11)
    at FSWatcher.start (fs.js:1443:19)
    at Object.fs.watch (fs.js:1470:11)
    at createFsWatchInstance (…/node_modules/chokidar/lib/nodefs-handler.js:37:15)

Turns out this is because Linux's inotify imposes a fairly strict limit on the number of files being monitored (see for example remy/nodemon#214 (comment)).

FWIW, when we ran into this with faucet-pipeline, we resorted to catching this error and offering an option to limit watching to certain directories:
https://github.com/faucet-pipeline/nite-owl/blob/906f1173e5cf71ff5f4794add4ad60a21fd438e3/index.js#L29
https://github.com/faucet-pipeline/faucet-pipeline/blob/4d0a0ffe18f8545775264db551154a8a7ced44b1/lib/index.js#L54-L59
Perhaps Fractal could automatically exclude node_modules when invoking chokidar?

@stale
Copy link

stale bot commented Jul 12, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 12, 2018
@stale stale bot closed this as completed Jul 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant