Build is not kicking off in a browser on save
OS
Windows 10.
Versions.
angular-cli: 1.0.0-beta.28.3
node: 6.9.2
os: win32 x64
@angular/common: 2.4.5
@angular/compiler: 2.4.5
@angular/core: 2.4.5
@angular/flex-layout: 2.0.0-beta.4
@angular/forms: 2.4.5
@angular/http: 2.4.5
@angular/material: 2.0.0-beta.1
@angular/platform-browser: 2.4.5
@angular/platform-browser-dynamic: 2.4.5
@angular/router: 3.4.5
@angular/compiler-cli: 2.4.5
Repro steps.
Migrate from beta.24 to beta.28.3 Modify any file Click save Chrome dev console saying:
[WDS] App updated. Recompiling...
[WDS] Nothing changed.
The new build is not kicking off
So had to stop and reastart ng serve manually
https://github.com/angular/angular-cli/commit/9fcf10a89b0995c2da606fbbe5a341d42044654b
I removed node_modules, i've ran npm install and https://github.com/angular/angular-cli/commit/9fcf10a89b0995c2da606fbbe5a341d42044654b is present in the build already.
In master, but not in beta 30 :/
It is in latest @ngtools/webpack. And I think, that @angular/cli always install the latest version.
On Mon, Feb 6, 2017, 13:22 Mick Lawitzke [email protected] wrote:
In master, but not in beta 30 :/
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/angular/angular-cli/issues/4338#issuecomment-277665943, or mute the thread https://github.com/notifications/unsubscribe-auth/AGkHslaLKr8liugoiDDtFgnT772_0td6ks5rZxBxgaJpZM4L0s2T .
Thanks @legit for solving my issue
Seems to be fixed for dev mode but still broken if use ng --aot --prod (didn't try just one).
Using a number that I keep incrementing to see what gets displayed it looks like somehow its serving up what was two compilations behind. i.e. starting at 0 at incrementing by 1, I see 1 when last saved and compiled change was 3, and 2 when last change was 4, etc..
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.
@ulymor you'd probably be interested in this comment https://github.com/angular/angular-cli/issues/2389#issuecomment-278913860 :-), as apparently modifying the inotify settings as so would use a large amount of RAM for nothing.
installing "@ngtools/webpack": "1.2.4" does work but the compilation is extreamly slow, why?
I'm still experiencing this issue. I'm building an a freshly updated Rasberry Pi 3 Model B.
@angular/cli: 1.0.0 node: 7.8.0 os: linux arm @angular/cli: 1.0.0 @angular/common: 4.0.1 @angular/compiler: 4.0.1 @angular/compiler-cli: 4.0.1 @angular/core: 4.0.1 @angular/forms: 4.0.1 @angular/http: 4.0.1 @angular/platform-browser: 4.0.1 @angular/platform-browser-dynamic: 4.0.1 @angular/router: 4.0.1 @ngtools/webpack: 1.3.0
It always catches that a file changes and rebuilds and sometimes works but eventually stops reflecting changes browser side. Once it stops working, it requires restarting ng serve to fix it.
same issue here: OS: Arch Linux @angular/cli: 1.0.0
{
"name": "client",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"core-js": "^2.4.1",
"rxjs": "^5.1.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@angular/cli": "1.0.0",
"@angular/compiler-cli": "^4.0.0",
"@types/jasmine": "2.5.38",
"@types/node": "~6.0.60",
"codelyzer": "~2.0.0",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.0.0",
"karma-cli": "~1.0.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-coverage-istanbul-reporter": "^0.2.0",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "~2.2.0"
}
}
I had the same issue but got it working!
My setup: A virtual machine running Linux with shared folders to Windows, coding in PhpStorm. My solution: In PhpStorm disabling the option Use "safe write" under Appearance / System Settings
Thought I should add this here. This is an open PR linked to by other issues similar to this one. It may contain a resolution for others still having this issue. https://github.com/angular/angular-cli/pull/4009
@themroc5 Thank you. It was well this problem that was also happening through WebStorm, now it worked.
hey i am new to angular just created new project as told in quick start. But ng serve is not recompiling. i tried all the things that are mentioned above. but still not working, My current version of @angular/cli is 1.1.1 and webpack is 1.4.
when i install webpack 1.2.4 it gives error while compiling.
I am also facing the same issue. ng serve is not getting reloaded when changes made in a particular directory Model. Apart from those Model classes it is detecting the changes.. I ran the command ng --version and got this result..
@angular/cli: 1.3.2 node: 6.11.2 os: win32 x64 @angular/animations: 4.4.3 @angular/cdk: 2.0.0-beta.11 @angular/common: 4.4.3 @angular/compiler: 4.4.3 @angular/core: 4.4.3 @angular/forms: 4.4.3 @angular/http: 4.4.3 @angular/material: 2.0.0-beta.11 @angular/platform-browser: 4.4.3 @angular/platform-browser-dynamic: 4.4.3 @angular/router: 4.4.3 @angular/cli: 1.3.2 @angular/compiler-cli: 4.4.3 @angular/language-service: 4.4.3
Please help me to fix this issue..
@themroc5 Thank you very much! After two days spending on this problem, finally solved and I had no idea it was all about phpStrom !
@mhyeganeh I find this issue very often in my workshops.
sudo ng serve works for me!
@chapultepec Please do not repeatedly cross-post the same message.
Also, advocating running a command as root as a general solution opens up the user to potential security implications. sudo should only be used when root permissions are absolutely required.
@clydin sorry i was trying to help because the issue is repeated. So if using sudo is not the best solution wich could be the solution?