Skip to content

"ng serve" Not Reflecting Changes Automatically in Angular 17 #26406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TanerSaydam opened this issue Nov 17, 2023 · 16 comments
Closed

"ng serve" Not Reflecting Changes Automatically in Angular 17 #26406

TanerSaydam opened this issue Nov 17, 2023 · 16 comments

Comments

@TanerSaydam
Copy link

Which @angular/* package(s) are the source of the bug?

compiler, Don't known / other

Is this a regression?

Yes

Description

Hello Angular Team,

I am encountering an issue with Angular 17 where the automatic re-rendering of changes upon saving files does not consistently occur when using ng serve. The application neither updates the UI nor throws any errors, and it requires a restart to reflect the changes. This issue is intermittent but significantly hampers the development process.

Steps to Reproduce:

  1. Run the application using ng serve.
  2. Make changes to a component or service.
  3. Save the file.

Expected Behavior:
The application should automatically reflect the changes in the browser without needing to manually restart the server.

Actual Behavior:
Sometimes, the application does not update the UI or show any error messages after saving changes. The only workaround is to stop and restart ng serve.

Environment:

  • Angular version: 17.x.x
  • Browser: [e.g., Chrome, Firefox]
  • Operating System: [e.g., Windows, macOS]

Additional Information:
This issue does not occur every time but is frequent enough to disrupt the normal workflow. I have not experienced this in previous versions of Angular. Any insights or solutions to this problem would be greatly appreciated.

Thank you for your time and assistance.

Best regards,
Taner Saydam

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

"dependencies": {
    "@angular/animations": "^17.0.0",
    "@angular/common": "^17.0.0",
    "@angular/compiler": "^17.0.0",
    "@angular/core": "^17.0.0",
    "@angular/forms": "^17.0.0",
    "@angular/platform-browser": "^17.0.0",
    "@angular/platform-browser-dynamic": "^17.0.0",
    "@angular/router": "^17.0.0",
    "rxjs": "~7.8.0",
    "tr-currency": "^1.0.0",
    "tslib": "^2.3.0",
    "zone.js": "~0.14.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^17.0.0",
    "@angular/cli": "^17.0.0",
    "@angular/compiler-cli": "^17.0.0",
    "@types/jasmine": "~5.1.0",
    "jasmine-core": "~5.1.0",
    "karma": "~6.4.0",
    "karma-chrome-launcher": "~3.2.0",
    "karma-coverage": "~2.2.0",
    "karma-jasmine": "~5.1.0",
    "karma-jasmine-html-reporter": "~2.1.0",
    "typescript": "~5.2.2"
  }

Anything else?

No response

@icarobteles
Copy link

I identified this same problem!

@TanerSaydam
Copy link
Author

I identified this same problem!

What did you do as a solution?

@icarobteles
Copy link

For now I'm using it anyway, unfortunately. The current execution of the command has ended and I run it again.

@TanerSaydam
Copy link
Author

For now I'm using it anyway, unfortunately. The current execution of the command has ended and I run it again.

Me too. Bu it's really annoying

@Dawidfigat
Copy link

Which @angular/* package(s) are the source of the bug?

compiler, Don't known / other

Is this a regression?

Yes

Description

Hello Angular Team,

I am encountering an issue with Angular 17 where the automatic re-rendering of changes upon saving files does not consistently occur when using ng serve. The application neither updates the UI nor throws any errors, and it requires a restart to reflect the changes. This issue is intermittent but significantly hampers the development process.

Steps to Reproduce:

  1. Run the application using ng serve.
  2. Make changes to a component or service.
  3. Save the file.

Expected Behavior:
The application should automatically reflect the changes in the browser without needing to manually restart the server.

Actual Behavior:
Sometimes, the application does not update the UI or show any error messages after saving changes. The only workaround is to stop and restart ng serve.

Environment:

  • Angular version: 17.x.x
  • Browser: [e.g., Chrome, Firefox]
  • Operating System: [e.g., Windows, macOS]

Additional Information:
This issue does not occur every time but is frequent enough to disrupt the normal workflow. I have not experienced this in previous versions of Angular. Any insights or solutions to this problem would be greatly appreciated.

Thank you for your time and assistance.

Best regards,
Taner Saydam

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

"dependencies": {
    "@angular/animations": "^17.0.0",
    "@angular/common": "^17.0.0",
    "@angular/compiler": "^17.0.0",
    "@angular/core": "^17.0.0",
    "@angular/forms": "^17.0.0",
    "@angular/platform-browser": "^17.0.0",
    "@angular/platform-browser-dynamic": "^17.0.0",
    "@angular/router": "^17.0.0",
    "rxjs": "~7.8.0",
    "tr-currency": "^1.0.0",
    "tslib": "^2.3.0",
    "zone.js": "~0.14.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^17.0.0",
    "@angular/cli": "^17.0.0",
    "@angular/compiler-cli": "^17.0.0",
    "@types/jasmine": "~5.1.0",
    "jasmine-core": "~5.1.0",
    "karma": "~6.4.0",
    "karma-chrome-launcher": "~3.2.0",
    "karma-coverage": "~2.2.0",
    "karma-jasmine": "~5.1.0",
    "karma-jasmine-html-reporter": "~2.1.0",
    "typescript": "~5.2.2"
  }

Anything else?

No response

@jnizet
Copy link
Contributor

jnizet commented Nov 18, 2023

Probably a duplicate of #26325. That has been fixed in version 17.0.1 of the CLI. Make sure you update (and specify the actual version you're using in future issues)

@Dawidfigat
Copy link

Probably a duplicate of #26325. That has been fixed in version 17.0.1 of the CLI. Make sure you update (and specify the actual version you're using in future issues)

@icarobteles
Copy link

@jnizet I'm already using version 17.0.1 and this problem persists.

@TanerSaydam
Copy link
Author

@jnizet I'm already using version 17.0.1 and this problem persists.

Me too 🤕

@JoostK JoostK transferred this issue from angular/angular Nov 18, 2023
@JoostK
Copy link
Member

JoostK commented Nov 18, 2023

This is likely either #26334 or #26390. The former appears to have been addressed in the upcoming 17.0.2 release, expected early next week.

@icarobteles
Copy link

@JoostK Thanks for the information!

@TanerSaydam
Copy link
Author

This is likely either #26334 or #26390. The former appears to have been addressed in the upcoming 17.0.2 release, expected early next week.

Thank you ☺️🙏

@alanzheng88
Copy link

alanzheng88 commented Nov 19, 2023

I'm experiencing a similar issue. Prior to the upgrade to v17, I would see /ng-cli-ws websocket being called in the request which would retrigger the livereload. Recently this call is no longer made when loading any pages using a custom domain that is not localhost for newer projects created and served via the angular-cli . I have not upgraded my @angular/cli 17.0.0 but only upgraded the other @angular packages to v17.0.3. confirmed it's caused by the missing runtime.js file when transitioning from webpack to vite/esbuild. when i change the builder application/browser-esbuild back to browser, the runtime.js shows up again during page load and livereload works fine.

would this be considered a regression? I may need to continue using the browser builder until this is fixed as having this livereload not working significantly hampers the development process

@alan-agius4
Copy link
Collaborator

Duplicate of #26334

@alan-agius4 alan-agius4 marked this as a duplicate of #26334 Nov 20, 2023
@alan-agius4 alan-agius4 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 20, 2023
@TanerSaydam
Copy link
Author

Most of solved but continue some css etc update.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants