Roots Discourse

Gulp Watch error on Ubuntu 14.04 [solved]


am getting the following error while try to use gulp watch, the browser sync is loading fine, but it wont detect the changes i make in the the file, any idea why ??

ajith@ajith-box:~/path/to/project/folder$ gulp watch
[21:56:37] Using gulpfile ~/path/to/project/folder/gulpfile.js
[21:56:37] Starting 'watch'...
[21:56:37] 'watch' errored after 28 ms
[21:56:37] Error: watch ENOSPC
at errnoException (fs.js:1031:11)
at FSWatcher.start (fs.js:1063:11)
at (fs.js:1088:11)
at Gaze._watchDir (/home/ajith/path/to/project/folder/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:289:30)
at /home/ajith/path/to/project/folder/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:358:10
at iterate (/home/ajith/path/to/project/folder/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:52:5)
at Object.forEachSeries (/home/ajith/path/to/project/folder/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:66:3)
at Gaze._initWatched (/home/ajith/path/to/project/folder/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:354:10)
at Gaze.add (/home/ajith/path/to/project/folder/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:177:8)
at new Gaze (/home/ajith/path/to/project/folder/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:74:10)

Thanks, :smile:

'gulp watch' consistently fails [solved]



Thanks for the link austin, i think its not the issue, there is more than 30GB space in the drive.


Finally found the solution :smile:

the reason for the error is there is a limit in the system for how many files can be watched by a user, using the following command in a terminal window we can simply increase the limit …

echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p


thanks for this information. It worked at my side too.


thanks bro… It worked… :smiley:


This worked for me also, thank you!


Thanks its worked for me :smiley:


Worked for me too, thanks


Tks! It helped me too!


It works! Solving the same problem when I use webpack-dev-server, thx!


Thanks man, it works!


thanks !!! It worked for me!


Same here !!! thank you !!!


Thanks a lot man it works!