Gulp error under Linux Error: What should I do with ENOSPC?

  

Recently, some users have reported that they have problems using gulp under Fedora and Ubuntu operating systems. Gulp reports Error: watch ENOSPC. What is going on? Gulp error under Linux Error: What should I do with ENOSPC?

gulp start with, with the following error:

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 Gaze._watchDir (/home/ajaxGu /work/froad/anhui-standard/personal-h5/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:289:30)

at /home/ajaxGu/work/froad/anhui-standard/personal-h5/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:358:10

at iterate (/home/ajaxGu/work/froad/anhui-standard/personal-h5/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:52: 5)

at Object.forEachSeries (/home/ajaxGu/work/froad/anhui-standard/personal-h5/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/Lib/helper.js:66:3)

At Gaze._initWatched (/home/ajaxGu/work/froad/anhui-standard/personal-h5/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:354: 10)

at Gaze.add (/home/ajaxGu/work/froad/anhui-standard/personal-h5/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/Lib/gaze.js:177:8)

at new Gaze (/home/ajaxGu/work/froad/anhui-standard/personal-h5/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob -watcher/node_modules/gaze/lib/gaze.js:74:10)

Solution:

The current problem is mainly because gulp watches need to listen to a lot of file changes, but fedora, The file handle of the ubuntu system is actually limited, so you can use the following command:

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

The above is the gulp error in Linux error:watch ENOSPC solution, users who encounter the same problem quickly try the above method Let's go!

Copyright © Windows knowledge All Rights Reserved