You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hot reload freezes if mistake in template file is corrected #26334
Please provide the environment you discovered this bug in (run ng version)
Angular CLI: 17.0.0
Node: v18.13.0
Anything else?
No response
Reacted by Dave, Elger Mensonides, Vlad, gpaimla, Oscar Valini Cunha, iqmeta GmbH, Paulo Teixeira, Sébastien Sougnez, Mathias Hammer, nifiro and 5 more
I am using Windows 11 Home 22H2 and "builder": "@angular-devkit/build-angular:application".
I'd say it's pretty frequent - once every 5-6 file saves and mainly I've been fiddling with html files.
NG_BUILD_DEBUG_PERF=1 doesn't log as it gets stuck totally and only "Reloading client(s)" is there.
Will try disabling parallelization later.
Update:
happens on both scenarios when there's some error and error html message is rendered, once making html template correct it loads up but hot reload stops working. Websocket connection is still in pending status while browsing network tab.
For those users who are still reporting file changes not triggering rebuilds, can you check if applying the changes in #26468 fixes the issue?
This can be done by installing the snapshot builds which is currently not on NPM
npm i https://github.com/angular/angular-devkit-build-angular-builds#cf42e6ade83e480cd29b8eba43f8daaf76367b4c --save-dev --force
To me it seems like its cause I was using something instead of app-root. Another thing which I had quit a few issues was that I was using direct import ... from 'src/app/...' which seems now not anymore to work, so you have to use '../../..' etc.
What I have figured is that, if one of your files has issues, Angular doesn't throw an error, which leads to the Browser just keeping on loading. I hope this gets fixed soon.
E.g You are current_file < import_in_2 < import_in_3
So if the import_in_3 file has errors, can lead to such behaviours.
If you are using SSR, make sure you specify the platform using PlatformId
Hi, guys.
First, thanks for the great work on v17.
I am experiencing the same issue even on 17.0.5.
I noticed the error occurred on a custom scss file I created where I am defining a custom theme:
$custom-light-theme: mat.define-light-theme((
color: (
primary: $web-ng-primary,
accent: $web-ng-accent, // Omit the accent color and the same freezing behavior will happen
),
));
I am able to reproduce the issue when purposely introducing an error when calling the built-in mat.define-light-theme function without the accent palette.
When I correct the error, the file change seems detected but no build is triggered and the page remains stuck in that error state.
angular-automatic-lock-bot commented on Jan 18, 2024
Activity
JoostK commentedon Nov 11, 2023
Could you provide some additional information about your setup:
@angular-devkit/build-angular:browser-esbuildor@angular-devkit/build-angular:applicationSome more general questions: how often does this occur? Could you identify which changes result in this behavior, or is it seemingly at random?
Other than that, some things you could try:
NG_BUILD_DEBUG_PERF=1environment variable to log profiling data, which may reveal where things get stuck.NG_BUILD_PARALLEL_TS=0environment variable to disable parallelization in certain areas.radekjakubowski commentedon Nov 11, 2023
I am using Windows 11 Home 22H2 and "builder": "@angular-devkit/build-angular:application".
I'd say it's pretty frequent - once every 5-6 file saves and mainly I've been fiddling with html files.
NG_BUILD_DEBUG_PERF=1 doesn't log as it gets stuck totally and only "Reloading client(s)" is there.
Will try disabling parallelization later.
Update:
happens on both scenarios when there's some error and error html message is rendered, once making html template correct it loads up but hot reload stops working. Websocket connection is still in pending status while browsing network tab.
kimanderssonm3cs commentedon Nov 13, 2023
Hi! I can confirm the same behaviour when getting html error, then fixing it, then getting stuck in reloading.
Alecto commentedon Nov 13, 2023
The same for me
scurk1415 commentedon Nov 14, 2023
I can also confirm that the same things happens with
@angular-devkit/build-angular:browser-esbuildChrisPienta1137 commentedon Nov 15, 2023
I also experienced this.
Windows 11
Angular CLI 17.0.0
Node 20.9.0
@angular-devkit/build-angular:application
Ameerusa86 commentedon Nov 16, 2023
Same for me, I have to keep stopping and re run the projects, is there any fix, ty
reduckted commentedon Nov 16, 2023
This might be related to #26325 which has just been fixed and released (haven't tried it yet).
radekjakubowski commentedon Nov 16, 2023
I tried it out for dependencies listed below:

And it doesn't work sadly... I'd bump my node to current version to see if it resolves issue (currently v18.13.0)
After bumping up node to v20.9.0 issue still occurs.
iqmeta commentedon Nov 16, 2023
Same here, happens random after 2 - 7 reloads:
"builder": "@angular-devkit/build-angular:application",
Angular CLI: 17.0.0
Node: 20.9.0
Package Manager: npm 10.2.3
OS: win32 x64 W11 22H2
Chrome 119
12 remaining items
dgp1130 commentedon Nov 20, 2023
17.0.2 should be out now with the fix. Please try it out and let us know if you're still seeing any challenges with the
ng serveexperience.radekjakubowski commentedon Nov 21, 2023
@dgp1130
Hey Douglas, can confirm it's fixed :)
ssougnez commentedon Nov 21, 2023
So far, so good for me as well/
geosh2000 commentedon Nov 23, 2023
still happening:
package.json:
{
"name": "gg-erp17",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"@angular/animations": "^17.0.4",
"@angular/cdk": "^17.0.1",
"@angular/common": "^17.0.4",
"@angular/compiler": "^17.0.4",
"@angular/core": "^17.0.4",
"@angular/forms": "^17.0.4",
"@angular/material": "^17.0.1",
"@angular/platform-browser": "^17.0.4",
"@angular/platform-browser-dynamic": "^17.0.4",
"@angular/router": "^17.0.4",
"rxjs": "~7.8.0",
"tslib": "^2.6.2",
"zone.js": "~0.14.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.0.3",
"@angular/cli": "^17.0.3",
"@angular/compiler-cli": "^17.0.4",
"@types/jasmine": "~5.1.0",
"autoprefixer": "^10.4.16",
"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",
"postcss": "^8.4.31",
"tailwindcss": "^3.3.5",
"typescript": "~5.2.2"
}
}
ManciDRaffy commentedon Nov 23, 2023
Same here, bug still occurs, but for me, it's every time I change something in HTML, so not only on fixing a bug
alan-agius4 commentedon Nov 23, 2023
For those users who are still reporting file changes not triggering rebuilds, can you check if applying the changes in #26468 fixes the issue?
This can be done by installing the snapshot builds which is currently not on NPM
HCenggel commentedon Nov 24, 2023
I have the default configuration. After using ng serve to start the project, this problem will also occur.
muhamedkarajic commentedon Nov 25, 2023
To me it seems like its cause I was using something instead of app-root. Another thing which I had quit a few issues was that I was using direct import ... from 'src/app/...' which seems now not anymore to work, so you have to use '../../..' etc.
nejat-njonjo commentedon Nov 26, 2023
What I have figured is that, if one of your files has issues, Angular doesn't throw an error, which leads to the Browser just keeping on loading. I hope this gets fixed soon.
E.g You are current_file < import_in_2 < import_in_3
So if the import_in_3 file has errors, can lead to such behaviours.
If you are using SSR, make sure you specify the platform using PlatformId
tarzasai commentedon Nov 30, 2023
Me too and while it was happening only on html errors in 17.0.0, with 17.0.2 I have to re-serve after every change, even if the html is correct.
devmadou commentedon Nov 30, 2023
Hi, guys.
First, thanks for the great work on v17.
I am experiencing the same issue even on
17.0.5.I noticed the error occurred on a custom scss file I created where I am defining a custom theme:
I am able to reproduce the issue when purposely introducing an error when calling the built-in
mat.define-light-themefunction without theaccentpalette.When I correct the error, the file change seems detected but no build is triggered and the page remains stuck in that error state.
angular-automatic-lock-bot commentedon Jan 18, 2024
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.