Roots Discourse

Gulp Watch error on Ubuntu 14.04 [solved]


#1

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 Object.fs.watch (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]
#2

Related? https://github.com/shama/gaze/issues/163


#3

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


#4

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

#5

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


#6

thanks bro… It worked… :smiley:


#7

This worked for me also, thank you!


#8

Thanks its worked for me :smiley:


#9

Worked for me too, thanks


#10

Tks! It helped me too!


#11

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


#12

Thanks man, it works!


#13

thanks !!! It worked for me!


#14

Same here !!! thank you !!!


#15

Thanks a lot man it works!