I'm trying to make a project in angular but when I try to compile it shows me these errors over and over till my IDE closes.
Watchpack Error (watcher): Error: ENOSPC: System limit for number of file watchers
reached, watch '/home/pedro/Universidad/Vacas-Dic2021/Archivos/LAB/MIA_Proyecto2_201709146_201900612/SoccerStatistics/node_modules/typescript'
Watchpack Error (watcher): Error: ENOSPC: System limit for number of file watchers
reached, watch '/home/pedro/Universidad/Vacas-Dic2021/Archivos/LAB/MIA_Proyecto2_201709146_201900612/SoccerStatistics/node_modules/typesript/lib'
I'm using angular 12 and node 14.17.6
If you can not increase the size of the watch (fs.inotify.max_user_watches), you can still compile angular using this command :
ng serve --watch --live-reload --poll 2000
Worked for me, and I am using virtual-studio-code as IDE
Remove node_modules and reinstall packages
(Not the best solution because this bug comes back after restarting the computer)
rm -rf node_modules
yarn install
That does the trick for me :)