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

--live option throws error ENOSPC when a large node_module is installed. #89

Open
m59peacemaker opened this issue Jul 13, 2015 · 1 comment

Comments

@m59peacemaker
Copy link

After installing webtorrent, a very large npm package, the --live option throws the following:

Error: watch ENOSPC
at exports._errnoException (util.js:746:11)
at FSWatcher.start (fs.js:1172:11)
at Object.fs.watch (fs.js:1198:11)
at createFsWatchInstance (/home/m59/.nvm/versions/node/v0.12.5/lib/node_modules/beefy/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/home/m59/.nvm/versions/node/v0.12.5/lib/node_modules/beefy/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at EventEmitter.NodeFsHandler._watchWithNodeFs (/home/m59/.nvm/versions/node/v0.12.5/lib/node_modules/beefy/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at EventEmitter.NodeFsHandler._handleFile (/home/m59/.nvm/versions/node/v0.12.5/lib/node_modules/beefy/node_modules/chokidar/lib/nodefs-handler.js:255:21)
at EventEmitter. (/home/m59/.nvm/versions/node/v0.12.5/lib/node_modules/beefy/node_modules/chokidar/lib/nodefs-handler.js:468:21)
at FSReqWrap.oncomplete (fs.js:95:15)

Running beefy without the --live option isn't affected.

@jessaustin
Copy link

You're on Linux, right? This is because inotify is running out of watches. Typically this is because you're running beefy while $PWD contains many descendants (e.g. as you describe, there might be a node_modules/ subdirectory that contains a big module). If you look around online you'll see various recipes for moving memory from user space to the kernel, but IMHO it's cleaner to just cd to a "leaf" directory before running beefy. Arguably the chokidar module should be smart enough to stay out of node_modules/ (especially since it depends on 57 modules all by itself), which would prevent this issue 95% of the time, but AFAICT it's not smart enough to do that. Apparently that's intentional; see paulmillr/chokidar#294.

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

2 participants