Watch causes gulp crash on Debian 3.16
ceremcem opened this issue · comments
I have a gulpfile.ls
and it works perfecly on Linux Debian 4.3.5-1 (good-guy
) and Windows 8 but crashes as soon as calling gulp-watch ...
on Debian 3.16.7-ckt25-2 (bad-guy
). Here is the crash scene:
...
JADE: compiling file: w232.jade
[08:23:06] Finished 'jade' after 34 s
[08:23:09] Finished 'vendor-css' after 37 s
events.js:141
throw er; // Unhandled 'error' event
^
Error: watch /home/ceremcem/apps/demeter-scada2/node_modules/buffer/node_modules/isarray/index.js ENOSPC
at exports._errnoException (util.js:873:11)
at FSWatcher.start (fs.js:1234:19)
at Object.fs.watch (fs.js:1262:11)
at createFsWatchInstance (/home/ceremcem/apps/demeter-scada2/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/home/ceremcem/apps/demeter-scada2/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/ceremcem/apps/demeter-scada2/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at FSWatcher.NodeFsHandler._handleFile (/home/ceremcem/apps/demeter-scada2/node_modules/chokidar/lib/nodefs-handler.js:255:21)
at FSWatcher.<anonymous> (/home/ceremcem/apps/demeter-scada2/node_modules/chokidar/lib/nodefs-handler.js:473:21)
at FSReqWrap.oncomplete (fs.js:82:15)
I tried copying all node_modules/
folder from good-guy
to bad-guy
. Result is the same (there is nothing related with modules themselves).
Npm and node versions are similar:
- on
good-guy
: npm: 3.8.2 and node: 4.3.0 - on
bad-guy
: npm: 3.10.5 and node: 4.4.7
It looks like you are exceeding the system limit on the number of files you can monitor.
Do you need to watch all files inside node_modules
? If not, try setting an ignore pattern—e.g. watch(['**/*.js', '!node_modules/'])
If you do need a large number of file watchers, you can increase the watchers limit:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
See the Guard wiki for details.
Yess, this is the problem itself. No, I can live without watching node_modules
:) Thank you.