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

Auto reload after modification html and css files ( "Nothing changed"

Open harishajdarevic opened this issue 9 years ago • 13 comments

Please provide us with the following information:

OS?

Ubuntu 16.04 LTS

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

angular-cli: 1.0.0-beta.26
node: 6.7.0
os: linux x64
@angular/common: 2.4.5
@angular/compiler: 2.4.5
@angular/compiler-cli: 2.4.5
@angular/core: 2.4.5
@angular/forms: 2.4.5
@angular/http: 2.4.5
@angular/platform-browser: 2.4.5
@angular/platform-browser-dynamic: 2.4.5
@angular/router: 3.4.5

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

1. Open app.component.html
2. Changed <div>test</div> to <div>test 22222</div>
3. In console I got message
[WDS] App updated. Recompiling...
[WDS] Nothing changed.

The log given by the failure.

Normally this include a stack trace and some more information.

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

harishajdarevic avatar Jan 27 '17 14:01 harishajdarevic

Okay I think we're missing adding those as direct dependencies, but they should be since there's a require() in the transpiled code. I'll need to investigate.

hansl avatar Jan 27 '17 18:01 hansl

I've got the same issue: ng -v

                             _                           _  _
  __ _  _ __    __ _  _   _ | |  __ _  _ __         ___ | |(_)
 / _` || '_ \  / _` || | | || | / _` || '__|_____  / __|| || |
| (_| || | | || (_| || |_| || || (_| || |  |_____|| (__ | || |
 \__,_||_| |_| \__, | \__,_||_| \__,_||_|          \___||_||_|
               |___/
angular-cli: 1.0.0-beta.28.3
node: 7.5.0
os: win32 x64
@angular/common: 2.4.5
@angular/compiler: 2.4.5
@angular/core: 2.4.5
@angular/forms: 2.4.5
@angular/http: 2.4.5
@angular/platform-browser: 2.4.5
@angular/platform-browser-dynamic: 2.4.5
@angular/router: 3.4.5
@angular/compiler-cli: 2.4.5

node -v

v7.5.0

alber70g avatar Feb 01 '17 23:02 alber70g

after changes in html and css the auto reload works, but changes in component.ts or whatever other typescript or config file i get " nothing changed " and has to stop and re run " ng serve " to get the latest compiled code.

angular-cli: 1.0.0-beta.28.3 node: 6.9.5 os: win32 x64 @angular/common: 2.4.5 @angular/compiler: 2.4.5 @angular/core: 2.4.5 @angular/forms: 2.4.5 @angular/http: 2.4.5 @angular/platform-browser: 2.4.5 @angular/platform-browser-dynamic: 2.4.5 @angular/router: 3.4.5 @angular/compiler-cli: 2.4.5

mapsgeek avatar Feb 02 '17 10:02 mapsgeek

I've got the same issue. After changes in html reload but typescripty "Nothing changed".

angular-cli: 1.0.0-beta.28.3 node: 7.5.0 os: win32 x64

@angular/common": "^2.4.4 @angular/compiler": "^2.4.4 @angular/compiler-cli": "^2.4.4 @angular/core": "^2.4.4 @angular/forms": "^2.4.4 @angular/http": "^2.4.4 @angular/platform-browser": "^2.4.4 @angular/platform-browser-dynamic": "^2.4.4 @angular/router": "^3.4.4

ramazanulucay avatar Feb 02 '17 13:02 ramazanulucay

I can conirm that this bug does not affect .html and .css, but very much .ts files. Process restart necessary for correct build. Looks pretty urgent to me

angular-cli: 1.0.0-beta.28.3 node: 7.4.0 os: linux x64 @angular/common: 2.4.5 @angular/compiler: 2.4.5 @angular/compiler-cli: 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/platform-browser: 2.4.5 @angular/platform-browser-dynamic: 2.4.5 @angular/router: 3.4.5

edit. OP is not running 28.3, for which there is already an issue: https://github.com/angular/angular-cli/issues/4338

phil294 avatar Feb 02 '17 16:02 phil294

This comment helped me...

Run this in your project directory: npm install --save @ngtools/[email protected]

Akimi avatar Feb 02 '17 17:02 Akimi

Don't forget to remove the ^ from the entry in package.json for future installs. It should read:

"@ngtools/webpack": "1.2.4"

panduit-psh avatar Feb 02 '17 17:02 panduit-psh

@panduit-psh Still getting nothing changed...

harishajdarevic avatar Feb 03 '17 14:02 harishajdarevic

I have also a delay for .html and .scss files. Only after every second build the changes of the first one will be shown.

@angular/cli: 1.0.0-beta.30
node: 6.9.1
os: darwin x64
@angular/common: 4.0.0-beta.6
@angular/compiler: 4.0.0-beta.6
@angular/core: 4.0.0-beta.6
@angular/forms: 4.0.0-beta.6
@angular/http: 4.0.0-beta.6
@angular/platform-browser: 4.0.0-beta.6
@angular/platform-browser-dynamic: 4.0.0-beta.6
@angular/router: 4.0.0-beta.6
@angular/cli: 1.0.0-beta.30
@angular/compiler-cli: 4.0.0-beta.6

linnenschmidt avatar Feb 03 '17 17:02 linnenschmidt

In my case it only occurs with enabled aot option ng serve --aot.

@angular/cli: 1.0.0
node: 7.7.1
os: darwin x64
@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
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.0

linnenschmidt avatar Mar 24 '17 12:03 linnenschmidt

I was going to open an issue and I confirm what @linnenschmidt mentioned about running --aot and making changes on .html. The browser seems to reload, but it doesn't show the html changes. However, if you make changes on the .ts, then the browser reloads the .html changes as well as .ts changes.

@angular/cli: 1.0.0
node: 7.5.0
os: darwin x64
@angular/common: 4.0.1
@angular/compiler: 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
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.1

Reproduce:

  1. run: ng serve --aot -o
  2. make changes to .html and save (notting happens)
  3. make changes to .ts and save (browser reload both files .html and .ts)

In case the GIF it's too slow, try the video http://recordit.co/TmqNaybhvh

aot-angular-cli-html

leocaseiro avatar Mar 31 '17 01:03 leocaseiro

Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.

If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.

filipesilva avatar May 22 '17 15:05 filipesilva

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.