[Solved] WebPack Error: Watchpack Error (watcher): Error: ENOSPC: System limit for number of file watchers reache

The following error occurs when the Vue project runs the NPM run serve command in the deepin20 system environment: (webpack error: watchpack error (watcher): error: enospc: system limit for number of file watchers reach)

Cause analysis: the limitation of Linux system causes this error!

Solution:

The problem can be solved by executing the following commands on the terminal:

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

Read More: