Watchpack is a wrapper library for directory and file watching. watchpack high-level API doesn’t map directly to watchers. Instead a three-level architecture ensures that for each directory only a single watcher exists.
How to fix the watchpack Error
Instructions on how to fix the error message: “Watchpack Error (watcher): Error: ENOSPC: System limit for number of file watchers reached“
1. Open sysctl.conf file (/etc/sysctl.conf)
2. Add the following statement
fs.inotify.max_user_watches=524288
3. Apply changes without restart
sudo sysctl -p
4. Run watcher
Conclusion
If you cannot edit/save sysctl.conf file, use the following command and try it again.
sudo chmod 777 ./sysctl.conf