October 19, 2024

This error message indicates that the limit for file watchers has been reached. File watchers are mechanisms that monitor changes in the file system and notify programs when necessary.

A File Watcher is software or a feature that monitors changes to files and directories within a computer system’s file system.

Since npm or a process controlled by it is watching too many files, launching Quasar project in Typescript, the below error might occur.

$ yarn quasar dev
Error: ENOSPC: System limit for number of file watchers reached, watch '/home/<user-name>/<your-app>/quasar.conf.js'

Solution

Updating max_user_watches on the build node can fix it forever. For Debian put the following on the terminal:

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

Reference

https://stackoverflow.com/questions/22475849/node-js-what-is-enospc-error-and-how-to-solve