TypeScript changes not deployed, even though ng serve detects the changes
Bug Report or Feature Request (mark with an x)
- [x ] bug report -> please search issues before submitting
- [ ] feature request
Versions.
@angular/cli: 1.1.2 node: 6.10.0 os: win32 x64 @angular/animations: 4.2.3 @angular/common: 4.2.3 @angular/compiler: 4.2.3 @angular/core: 4.2.3 @angular/flex-layout: 2.0.0-beta.8 @angular/forms: 4.2.3 @angular/http: 4.2.3 @angular/material: 2.0.0-beta.7 @angular/platform-browser: 4.2.3 @angular/platform-browser-dynamic: 4.2.3 @angular/router: 4.2.3 @angular/cli: 1.1.2 @angular/compiler-cli: 4.2.3
Repro steps.
- Make a change to a TypeScript file
- Observe that webpack recompiles
- Observe that the browser refreshes
- Observe that the TypeScript changes were not deployed to the browser
- Make a change to an html template file
- Observe that the html changes have been deployed to the browser, but any TypeScript changes have not
No exceptions are thrown
Mention any other details that might be useful.
This was first reported against v1.0 (#5600) and closed as presumably fixed, but the issue persists.
IDE: IntelliJ OS: Windows 10
I have this exact problem, too. HTML gets changed, but TS does not. I Ctrl+C and ng serve again to make it pick up my changes. Sometimes, it works just fine and picks up my changes, though.
"@angular/animations": "^4.0.0",
"@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/cli": "1.1.2",
"@angular/compiler-cli": "^4.0.0",
``
IDE: WebStorm
OS: Windows 8
I have been experiencing this problem intermittently for a while now (even back in version 2).
I'm not sure, but this seems to happen after very small changes (1-2 lines of code). Larger changes seem to get picked up. Also, my terminal shows that the CLI is recompiling after every change.
Sometimes happens to me too but only if I update an interface definition. All other changes are fine.
I think this only happens on my Windows machine. Seems to be okay on MacOS. Can anyone confirm it's the same for them?
@jongunter Same here. Works fine on MacOS running @angular/cli version 1.0, but I haven't tried 1.1.2 on my Mac yet.
@jongunter Since most of my changes are small, I hadn't given it much thought, but you're definitely on to something. From a newly created app, I can change the title property in app.component.ts by adding several characters to the string, and the change is not recognized. However, if I add several hundred characters to the title property, it works as expected.
Same here, all changes gets registered but I have to recompile two/three times to get the changes "live" in the browser. TS files only requires two compiles but HTML sometimes need three, and SCSS files only requires one compilation.
IDE: Visual Studio Code Version 1.13.1 OS: Win10 x64
dep: "@angular/animations": "^4.1.3", "@angular/common": "^4.1.3", "@angular/compiler": "^4.1.3", "@angular/core": "^4.1.3", "@angular/forms": "^4.1.3", "@angular/http": "^4.1.3", "@angular/platform-browser": "^4.1.3", "@angular/platform-browser-dynamic": "^4.1.3", "@angular/router": "^4.1.3", "bootstrap-sass": "^3.3.7", ....
devDep: "@angular/cli": "^1.0.6", "@angular/compiler-cli": "^4.1.3", "@ngtools/webpack": "^1.3.1", "@types/jasmine": "2.5.52", "@types/node": "~8.0.0", "@types/signalr": "^2.2.33", "@types/gridstack": "^0.0.36", "codelyzer": "~3.0.1", "ts-node": "~3.0.6", "tslint": "~5.4.3", "typescript": "~2.3.4"
Running following command:
ng serve --aot --host 0.0.0.0 --port 3000 --proxy-config proxy.config.json
@etovian Please check this issue #4394, have you tried to disable "safe write"?
@krilllind This seems to have solved the problem for me; thanks so much for the tip! I'm going to keep an eye on it for a bit to be sure, but I'll likely close the issue soon. For others who are using IntelliJ/WebStorm, here's how to disable safe write, as @krillind suggested. Thanks again!
Heya, the main issue for these problems is https://github.com/angular/angular-cli/issues/1610. As @krilllind mentioned, disabling safe write in your IDE should help.
Sorry but I always read "disable this option in [your ide]". I use notepad++. So where can I find this option if there is no IDE? It worked fine with a2 and a2univeral. Why do I need an IDE now hack some code? @filipesilva
Same issue here with Angular CLI 7.3.9 and Node.js 12.3.0 on Windows 10 and Ubuntu 19.04. Even if I use the base Notepad from Winsdows (so there is no concept of safe write with this tool), TypeScript changes are never reflected, only HTML and CSS changes.
Same issue here with Angular CLI 7.3.9 and Node.js 12.3.0 on Windows 10 and Ubuntu 19.04. Even if I use the base Notepad from Winsdows (so there is no concept of safe write with this tool), TypeScript changes are never reflected, only HTML and CSS changes.
Me too facing the same problem with windows 10 same cli version and node 10.16
On my side, this issue was fixed after upgrading to Angular 8.1.0 :+1:
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.