Skip to content

Instantly share code, notes, and snippets.

@brunoleles
Last active January 22, 2021 15:10
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save brunoleles/ee689cac84599ab78e415748c241ccfc to your computer and use it in GitHub Desktop.
Save brunoleles/ee689cac84599ab78e415748c241ccfc to your computer and use it in GitHub Desktop.
Gulp Watch Fails with "Error: watch ... ENOSPC"

gulp watch fails with error: Error: watch ... ENOSPC

Stacktrace:

[13:58:28] Starting 'watch'...
[13:58:28] 'watch' errored after 22 ms
[13:58:28] Error: watch /.../resources/assets/images/ ENOSPC
    at exports._errnoException (util.js:1023:11)
    at FSWatcher.start (fs.js:1306:19)
    at Object.fs.watch (fs.js:1331:11)
    at Gaze._watchDir (/.../node_modules/gaze/lib/gaze.js:289:30)
    at /.../node_modules/gaze/lib/gaze.js:358:10
    at iterate (/.../node_modules/gaze/lib/helper.js:52:5)
    at Object.forEachSeries (/.../node_modules/gaze/lib/helper.js:66:3)
    at Gaze._initWatched (/.../node_modules/gaze/lib/gaze.js:354:10)
    at Gaze.add (/.../node_modules/gaze/lib/gaze.js:177:8)
    at new Gaze (/.../node_modules/gaze/lib/gaze.js:74:10)

Fix:

Put a "large" "max watches" a user can create.

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
@sergiy-petrov-vakoms
Copy link

Thanks! Works for me

@willsilvano
Copy link

Thanks! Works for me too!

@ashokpal100
Copy link

Thanks! Works for me.

@iSanchezDev
Copy link

Thanks, worked!

@arctic-hare
Copy link

Thanks!

@ernestojr
Copy link

Cool! Thanks!

@rony-cherian
Copy link

Awsome,worked for me

@alessandrosales
Copy link

Thanks! Works for me.

@hstevemcdonald
Copy link

Fixed. Thanks!

@lincolncosta
Copy link

Worked for me, thanks!

@HaoZeke
Copy link

HaoZeke commented Aug 7, 2018

Lifesaver 👍

@mjrulesamrat
Copy link

Great! Worked for me as well. Thanks.

@GettyOrawo
Copy link

Awweeessoommee!!!

@thierryruiz
Copy link

Thanks a lot for sharing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment