Using ng serve
the project runs in localhost but after changing the code it does not refresh.
Lets say we have the general \"App Works!!\" in the initia
The solution for Ubuntu webpack rebuild issue.
The problem seems to be the inotify max_user_watches :
sudo echo "fs.inotify.max_user_watches=524288" >> /etc/sysctl.conf
sudo sysctl -p /etc/sysctl.conf
This is a bug within the latest @ngtools/webpack
package that the angular-cli uses. To fix this you need to manually downgrade the package:
npm uninstall @ngtools/webpack
npm install --save-dev @ngtools/webpack@1.2.4
After a new cli version, you should remove this from your package.json
again
For more information check this bug report
Had the same problem with Ubuntu 16.04. Quick fix:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Hope this helps someone!