Ionic serve - Error: watch ENOSPC

I’m getting this when I run “ionic serve” :

Running serve task...

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: watch ENOSPC
    at errnoException (fs.js:1019:11)
    at FSWatcher.start (fs.js:1051:11)
    at Object.fs.watch (fs.js:1076:11)

Anyone knows what’s going on? :frowning:

This seems to an issue with the actual computer…according to this post on StackOverflow.

The system has a limit to how many files can be watched by a user. You can run out of watches pretty quickly if you have Grunt running with other programs like Dropbox.

The post suggest running this to increase the number of watches that are available.

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

3 Likes