Ole
Ole

Reputation: 46920

Angular CLI does not reload when editing component html?

I'm running the app with ng serve -o. If I edit styles.scss and hit save then the app live reloads, but editing components (TS or HTML) does not trigger a reload.

No errors show up in in the developer console or in the CLI.

Thoughts?

Upvotes: 1

Views: 184

Answers (1)

Lia
Lia

Reputation: 11982

It happens because of limit of inotify watches and extra files will not be observed, you should increas amount of it.

For Debian, RedHat, or another similar Linux distribution, run:

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

For ArchLinux, run:

echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system

Upvotes: 1

Related Questions