admin管理员组

文章数量:1387312

I have upgraded my application from Angular 18 to 19. After a successful migration, any code changes I make are not reflected in the browser, and the application does not auto-reload when I modify the code. Even after making changes, the old version is still displayed.

I have upgraded my application from Angular 18 to 19. After a successful migration, any code changes I make are not reflected in the browser, and the application does not auto-reload when I modify the code. Even after making changes, the old version is still displayed.

Share Improve this question asked Mar 17 at 15:59 Harish RedyshettyHarish Redyshetty 114 bronze badges 2
  • Clear your cache? – Mr. Polywhirl Commented Mar 17 at 16:03
  • if you don't have any errors in the dev tools console. here is what I suggest: 1. update your node version to the latest by installing nvm globally if you don't have it yet. 2. Switch to the newest version of the node using nvm use <node version> 3. run ng serve, now to see if the issue persists again. Or share any logs or warnings you may see from dev tools so we can debug further. – Hakim Asa Commented Mar 18 at 9:51
Add a comment  | 

1 Answer 1

Reset to default 1

My gut feeling is that the problem is related to HMR (hot module replacement). Starting in Angular 19 HMR is enabled for css/scss and HTML files by default. When you run ng s it says the following:

Component HMR has been enabled. If you encounter application reload issues, you can manually reload the page to bypass HMR and/or disable this feature with the --no-hmr command line option. Please consider reporting any issues you encounter here: https://github/angular/angular-cli/issues

本文标签: angular19Angular 19 migration issueStack Overflow