DEV Community

Cover image for Fix Error: ENOSPC: System limit for number of file watchers reached
Shawon Saha
Shawon Saha

Posted on

Fix Error: ENOSPC: System limit for number of file watchers reached

Error: ENOSPC:

This error could be nightmare.

The inotify package in Linux is used to monitor filesystem events, specific files, or directories.

React/Angular/Vue must maintain track of every file in a project since it hot-reloads and recompiles files after saving. The warning message will disappear if the inotify watch limit is raised.

Run this command into your terminal,

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

To check that the new value was applied or not run this

cat /proc/sys/fs/inotify/max_user_watches
Enter fullscreen mode Exit fullscreen mode

config variable name (not runnable)

fs.inotify.max_user_watches=524288
Enter fullscreen mode Exit fullscreen mode

Oldest comments (0)