Re-compile does not always trigger browser update
OS?
Linux Kubuntu 16.10
Versions.
@angular/cli: 1.0.0-beta.30 node: 7.4.0 os: linux x64
Repro steps.
ng new newApp
cd newApp
ng serve
Edit app.component.ts (I changed 'app works!' to 'app works!!') and save.
This will trigger a re-compile.
The log given by the failure.
[WDS] App updated. Recompiling... [WDS] App updated. Recompiling... [WDS] Nothing changed.
Mention any other details that might be useful.
The hash between compile runs does not change.
I've seen an issue on this topic before, but it appears this is not a Windows-specific problem.
this happens for minor changes.
What kind of changes are considered to be "minor"?
may be adding/removing a semi colon. who knows!
I am also facing this same issue on ubuntu 16.04.
When I try to add / remove a piece of code like (console.log() or a tag from html)
Also happens to me on Windows, for a new ng project, and an existing project that had been updated to 1.0.0-beta.30.
Changing a character in app.component.html triggers the browser update, but changing something in app.component.ts does not.
I'm facing the same problem. I will investigate it little bit further, but from what I observed, I can tell changing .ts triggers recompilation, BUT browser is still seeing old data.
I also have the same problem on Win 10.
Same here with Win7, node v6.9.1, npm v3.10.8
Same issue here: Win10 pro, Node.js v7.4.0, NPM v4.1.2. When saving a .ts, the scripts compile, but:
- the package sizes don't seem to change
- the webapp doesn't refresh
For both my upgraded and new project. Doesn't seem to matter if the change is small or big.
Tested, and v1.0.0-beta.29 doesn't seem to have the same issue for me.
I reinstalled beta 30, and I don't seem to have the issue anymore. :-\
@Ionaru can you please re-test and report back? make sure you run npm cache clean before you reinstall your dependencies. I was trying to reproduce this locally on a clean install of beta 30 and was not able to reproduce.
Thanks!
FYI - To anyone who has not tried it yet. If you work directly from Master using npm link like shown in the README (at the bottom). It works, because the code for this has been fixed already. It can be a pain developing like that but I can always get through the NPM posted version error/bugs this way.
We have the same issue on 3 Windows 10 machines with an existing project that had been updated to 1.0.0-beta.30 from 1.0.0-beta.26. All machines have Node 6.9.x. One of the machines has a clean install of Windows, so no npm cache was present when the packages had been installed, it has 1.0.0-beta.30 from the beginning.
@MateEke are you able to share that repo?
Sorry, but unfortunately not possible, as it's not an open source project.
That's cool... can you share your package.json and angular-cli.json?
I have some problem too. I just create new application with ng new. Then i started ng serve. Webpack compiled successfully. If i change template file or css then recompiled successful and live reload works. But if i change some in .ts files then live reloading not works and .ts files not compiled. Although webpack shown compiled successfully. If restart ng serve all changes apply successfully.
OS: Ubuntu 16.04 LTS Node: v7.4.0 Npm: 4.0.5
{ "name": "slots", "version": "0.0.0", "license": "MIT", "angular-cli": {}, "scripts": { "ng": "ng", "start": "ng serve", "test": "ng test", "pree2e": "webdriver-manager update --standalone false --gecko false", "e2e": "protractor" }, "private": true, "dependencies": { "@angular/common": "^2.3.1", "@angular/compiler": "^2.3.1", "@angular/core": "^2.3.1", "@angular/forms": "^2.3.1", "@angular/http": "^2.3.1", "@angular/platform-browser": "^2.3.1", "@angular/platform-browser-dynamic": "^2.3.1", "@angular/router": "^3.3.1", "core-js": "^2.4.1", "rxjs": "^5.0.1", "ts-helpers": "^1.1.1", "zone.js": "^0.7.2" }, "devDependencies": { "@angular/cli": "1.0.0-beta.30", "@angular/compiler-cli": "^2.3.1", "@types/jasmine": "2.5.38", "@types/node": "^6.0.42", "codelyzer": "~2.0.0-beta.1", "jasmine-core": "2.5.2", "jasmine-spec-reporter": "2.5.0", "karma": "1.2.0", "karma-chrome-launcher": "^2.0.0", "karma-cli": "^1.0.1", "karma-jasmine": "^1.0.2", "karma-remap-istanbul": "^0.2.1", "protractor": "~4.0.13", "ts-node": "1.2.1", "tslint": "^4.3.0", "typescript": "~2.0.3" } }
Log after .ts changing:
[WDS] App updated. Recompiling...
[WDS] Nothing changed.
@Brocco
I can confirm this is still not working, I used a completely clean installation of @angular/cli.
What I did:
sudo npm -g remove @angular/cli
npm cache clean
sudo npm cache clean (just to be safe)
sudo npm -g install @angular/cli
ng new myNewApp (the myNewApp folder did not previously exist)
cd myNewApp
ng serve
Edited app.component (Two seperate edits, one with Kate and one with gedit)
But the hash in the ng serve terminal was still the same, and the website did not refresh.
I also tried doing the same steps using a direct clone and install of the Master branch as suggested by @jwuliger, no luck there either.
Edit: I just tested this on a clean install of Ubuntu 16.10 (On a VM), and the issue is still present. @Brocco what were your steps trying to reproduce this?