DEV Community

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

Posted on

26

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

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay