ng build and ng serve not detecting file changes
Ubuntu 16.04 angular-cli: 1.0.0-beta.15 node: 6.6.0 os: linux x64 watchman: 4.7.0
Run either ng build --watch or ng serve. Change any file inside of src, no changes detected.
Same here. Since update to 1.0.0-beta.15 it doesn't work. It used to work with beta.14.
Didn't work for me in beta 14 either. Didn't work using node events nor watchman.
On Tue, 27 Sep 2016 13:52 nehemia, [email protected] wrote:
Same here. Since update to 1.0.0-beta.15 it doesn't work. It used to work with beta.14.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/angular/angular-cli/issues/2356#issuecomment-249855569, or mute the thread https://github.com/notifications/unsubscribe-auth/ACrzGs0JYRg__vEcBD2ItTYxiXLRbPZWks5quRGTgaJpZM4KGug4 .
I noticed when i make a new project in a folder containing white spaces in the name/path some files are missing in node-modules (970 folders)and auto update doesn't work. When creating a project in a folder without white spaces everything works fine, node-modules(978 folders). (This is on Linux mint).
See https://github.com/angular/angular-cli/issues/1610#issuecomment-251995850
I'm using agular cli to create and serve a project, after editing a file it doesnot auto update the server, i have to restart the ng serve again.
I tried ng serve and ng build --watch , both not working
Output of ng -v
angular-cli: 1.0.0-beta.18 node: 6.2.2 os: linux x64
just remove spaces and special characters from all root directories of project directory(inclusive).
I'm using agular cli to create and serve a project, after editing a file it doesnot auto update the server, i have to restart the ng serve again.
I tried ng serve and ng build --watch , both not working
re install npm install , also i checked the folder names but still not working
No problems here with ng build --watch
~$: ng version --verbose
angular-cli: 1.0.0-beta.25.5
http_parser: 2.7.0
node: 7.4.0
v8: 5.4.500.45
uv: 1.10.1
zlib: 1.2.8
ares: 1.10.1-DEV
modules: 51
openssl: 1.0.2j
icu: 58.2
unicode: 9.0
cldr: 30.0.3
tz: 2016j
os: linux x64
For those who use windows:
It is a bug in the latest CLI. Execute the following command in your project folder: "npm install --save @ngtools/[email protected]" and npm start or ng serve.
And it should work fine
I faced with the same problem on Ubuntu 16.04 and angular CLI 1.0.0-beta.30
The problem was related with Inotify Watches Limit on Linux. To solve to issue I increased the watches limit to 512K
sudo sysctl fs.inotify.max_user_watches=524288
sudo sysctl -p --system
After that I restarted my IDE (WebStorm in my case) and after that the change detection started to work.
I am facing the same problem Is it because i have a .git folder in my root directory
@ulymor Thank you, your comment helped me find the root issue. Apparently Sublime 3 has a known bug that uses up all of the inotify watches. Once I closed Sublime, suddenly ng serve started working properly again.
@hectorMurillo After executing "npm install --save @ngtools/[email protected]" i got this Error:
ERROR in ./src/main.ts Module build failed: TypeError: Cannot read property 'newLine' of undefined
Anyone finding this on Google:
I encountered this issue on Ubuntu 16.04 with Angular/cli 1.0.3 while using Sublime Text 3.
From reading @RPGillespie6 comment, I close all my instances of Sublime Text, ctrl + c on running ng serve. Restart ng serve and reopen Sublime Text. I modify a file and save and everything works fine.
Before closing out Sublime Text I had tried restarting ng serve multiple attempts did not fix the problem.
when i am using ng -v: i am getting this: Mg++ version: Mg++ 1.5beta1 (formerly MicroGnuEmacs Adv.) and ng serve; -----Mg: serve (fundamental)----All------------------
what i need to do to work ng serve ?
Thank you @ulymor for https://github.com/angular/angular-cli/issues/2356#issuecomment-278298550
@kasireddie use nvm ..google on it
@ulymor i have tried lot of ways to resolve it but your comments helped.... Thanks a lot.
hello guys, this problem was related to Inotify Watches limit on Linux. this command run and issue is solved,
cho 65536 | sudo tee -a /proc/sys/fs/inotify/max_user_watches
and run ng serve or ng build. And it should work fine
The problem is that other programs are competing for inotifies as well (VSCode, etc.) and angular-cli doesn't tell you that you are out, it just silently fails. Sometimes the solution is that you need to close another program that is using up inotifies...