Reputation: 332
I faced a problem, on Ubuntu 17.04 @angular/[email protected]
command ng build --watch
exits after it builds app (successfully) and doesn't start to watch. ng serve
though works fine and starts watcher.
The most similar problems I found were solved with setting output path via -op
option or outDir
property in .angular-cli.json
, none of these seem to help in my case. Any ideas of what possibly can be the reason to that?
Update
My bad, ng serve
just didn't stop process, watcher still wasn't working.
Upvotes: 1
Views: 2044
Reputation: 332
Given the update, it became clear that the problem is with watching generally and not with specific command so I found out that the problem is with Linux Inotify
watches limit which can be expanded in either way:
sudo sysctl fs.inotify.max_user_watches=524288
sudo sysctl -p --system
or
echo 65536 | sudo tee -a /proc/sys/fs/inotify/max_user_watches
The problem with this is that limit resets on computer restart.
Sources:
https://github.com/angular/angular-cli/issues/2356#issuecomment-278298550
https://github.com/angular/angular-cli/issues/2389#issuecomment-250964095
Upvotes: 5