angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng build and ng serve not detecting file changes

Open jshthornton opened this issue 10 years ago • 31 comments

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.

jshthornton avatar Sep 26 '16 16:09 jshthornton

I'm having this issue not on Linux but Windows 10 machine and VS Code.

owlstack avatar Apr 01 '18 01:04 owlstack

Reporting that this is still an issue with @angular/cli: 1.7.4 on Windows 10. In my case I need to close Visual Studio Code for the changes to get picked up in the build.

Angular CLI: 1.7.4 Node: 8.9.4 OS: win32 x64 Angular: 5.2.10 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router

@angular/cli: 1.7.4 @angular-devkit/build-optimizer: 0.3.2 @angular-devkit/core: 0.3.2 @angular-devkit/schematics: 0.3.2 @ngtools/json-schema: 1.1.0 @ngtools/webpack: 1.10.2 @schematics/angular: 0.3.2 @schematics/package-update: 0.3.2 typescript: 2.5.3 webpack: 3.11.0

l-tree avatar Apr 26 '18 19:04 l-tree

Increasing inotify watches and restarting ng serve did not help me.

j-frost avatar May 09 '18 13:05 j-frost

sudo ng serve works!

chapultepec avatar Sep 13 '18 14:09 chapultepec

sudo ng serve works!

Works me to..

pgfepale avatar Sep 20 '18 17:09 pgfepale

same issue here with angular 6. I resolved it using ng serve --watch

HongshanLi avatar Oct 02 '18 16:10 HongshanLi

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 ?

Hi, Did you manage to solve that behaviour ?

hhsissi avatar Oct 29 '18 10:10 hhsissi

I had the same issue working on Vagrant vm on Ubuntu 16.04 LTS.

Angular CLI: 6.0.8
Node: 11.10.0
OS: linux x64
Angular: 6.1.7

I tried all solutions, increasing notify watches, using --watch reinstalling npm and node. Nothing worked. This is what solved it for me. adding --poll=2000 like so:

ng serve --poll=2000 --host 0.0.0.0

Anyoks avatar Feb 25 '19 09:02 Anyoks

Ubuntu 18.04 with Angular CLI(7.3.7).

"echo 65536 | sudo tee -a /proc/sys/fs/inotify/max_user_watches" works for me as @piyarulps suggested.

hwh7 avatar Apr 03 '19 04:04 hwh7

sudo ng serve works!

Works for me, in Linux 18.01, thanks @pgfepale

lflores avatar Apr 22 '19 14:04 lflores

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.