10

I am getting this error while doing my Angular 10 project.

Error from chokidar (/myProject): Error: ENOSPC: System limit for number of file watchers reached, watch '/myProject/tsconfig.spec.json'

Is there a method to resolve this error?

user157251
  • 64,489
  • 38
  • 208
  • 350
MikhilMC
  • 353
  • 2
  • 4
  • 10

3 Answers3

17

You're running into a kernel limit with your inotify watchers. You can run this to fix it for the current boot,

sudo sysctl -w fs.inotify.max_user_watches=524288

You can run this to fix it for future boots,

echo "fs.inotify.max_user_watches=524288" \ 
  | sudo tee -a /etc/sysctl.conf
user157251
  • 64,489
  • 38
  • 208
  • 350
user3294794
  • 179
  • 4
3

I found this post and helped me to solve that problem. All you have to do is change the max_user_watches

Error ENOSPC System limit for number of file watchers reached

Alan Mejia
  • 81
  • 3
0

Use below

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

To increase the number of watches by your system

Prabhat Mishra
  • 563
  • 6
  • 20
Jasper
  • 1
  • 2