I recently switched to Ubuntu from Windows and ng serve in Visual Studio Code is not auto compiling the code after every save.
I have to stop the terminal and fire the command again to compile my code.
I recently switched to Ubuntu from Windows and ng serve in Visual Studio Code is not auto compiling the code after every save.
I have to stop the terminal and fire the command again to compile my code.
Listen uses inotify by default on Linux to monitor directories for changes. It's not uncommon to encounter a system limit on the number of files you can monitor. For example, Ubuntu Lucid's (64bit) inotify limit is set to 8192.
You can get your current inotify file watch limit by executing:
$ cat /proc/sys/fs/inotify/max_user_watches
When this limit is not enough to monitor all files inside a directory, the limit must be increased for Listen to work properly.
You can set a new limit temporary with:
$ sudo sysctl fs.inotify.max_user_watches=524288 $ sudo sysctl -p
If you like to make your limit permanent, use:
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf $ sudo sysctl -p
Source: https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers
some time auto refreshes not working so you can be forcing ng serve command using sudo before the command. like: sudo ng serve.
after that, you would not need compiling the code after every saves.