Skip to content

HMR in Angular 19.1.1 breaks page reload by ignoring --serve-path #29395

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
nhnb opened this issue Jan 18, 2025 · 2 comments
Closed

HMR in Angular 19.1.1 breaks page reload by ignoring --serve-path #29395

nhnb opened this issue Jan 18, 2025 · 2 comments

Comments

@nhnb
Copy link

nhnb commented Jan 18, 2025

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

compiler-cli

Is this a regression?

Yes

Description

Since Angular 19.1.x the --serve-path parameter is ignored by hot template replacements requests. As a result the page is neither updated nor reloaded automatically. A manual reload is required.

Steps to reproduce:

  1. Start the dev server: ng serve --no-hmr --port 5602 --host 127.0.0.1 --serve-path /frontend
  2. Modify a .html file

Result in 19.0.x: The page is automatically reloaded
Result in 19.1.x: Nothing happens. The old page is still shown

Workaround: Start the dev server with: ng serve --no-hmr --port 5602 --host 127.0.0.1 --serve-path /frontend

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

Error message: 404 http://localhost:8080/@ng/component?c=src%2Fapp%2Ffs%2Ftestform.component.ts%40TestformComponent&t=1737187096102

Note the missing `/frontend/` before `@ng`

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

Angular CLI: 19.1.2
Node: 20.18.1
Package Manager: yarn 1.22.19
OS: linux x64

Angular: 19.1.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1901.2
@angular-devkit/build-angular   19.1.2
@angular-devkit/core            19.1.2
@angular-devkit/schematics      19.1.2
@angular/cdk                    17.3.10
@angular/cli                    19.1.2
@schematics/angular             19.1.2
ng-packagr                      19.0.1
rxjs                            7.8.1
typescript                      5.6.3
zone.js                         0.15.0

Anything else?

No response

@crisbeto crisbeto transferred this issue from angular/angular Jan 18, 2025
@alan-agius4 alan-agius4 changed the title HRM in Angular 19.1.1 breaks page reload by ignoring --serve-path HMR in Angular 19.1.1 breaks page reload by ignoring --serve-path Jan 18, 2025
@alan-agius4
Copy link
Collaborator

Duplicate of #29248

@alan-agius4 alan-agius4 marked this as a duplicate of #29248 Jan 18, 2025
@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 Feb 18, 2025
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

2 participants