-
Notifications
You must be signed in to change notification settings - Fork 12k
Hot reload freezes if mistake in template file is corrected #26334
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
Comments
Could you provide some additional information about your setup:
Some 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:
|
I am using Windows 11 Home 22H2 and "builder": "@angular-devkit/build-angular:application". NG_BUILD_DEBUG_PERF=1 doesn't log as it gets stuck totally and only "Reloading client(s)" is there. Update: |
Hi! I can confirm the same behaviour when getting html error, then fixing it, then getting stuck in reloading. |
The same for me |
I can also confirm that the same things happens with |
I also experienced this. |
Same for me, I have to keep stopping and re run the projects, is there any fix, ty |
This might be related to #26325 which has just been fixed and released (haven't tried it yet). |
I can confirm that it is now working correctly in 17.0.1 |
Dunno why it got closed when me and @iqmeta still have same issue on 17.0.1... |
I did some investigation and was able to reproduce consistently with the following steps:
A few more notes:
Digging down this looks like a Windows pathing issue. After every build we check if any files were added or removed from the compilation and update the file watcher to match. To do this we compare the files we were watching before a build with the files we found during the build (relevant code). Inspecting this state I found:
Due to the different separators, the CLI thinks we stopped watching |
Yeah sorry, it seems to be working when .ts files are fixed, but as you say above, html files and other files are still breaking. |
I think I have the same issue. In my case, I'm not using For example, here, I updated a regular variable into a signal but the compiler does not see it:
If I stop the build and launch it again it works. |
@dgp1130 great news! Amazing work with v17 so far <3 |
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 |
@dgp1130 |
So far, so good for me as well/ |
Same here, bug still occurs, but for me, it's every time I change something in HTML, so not only on fixing a bug |
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
|
I have the default configuration. After using ng serve to start the project, this problem will also occur. |
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. |
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. |
Hi, guys. I am experiencing the same issue even on $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 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
Yes
Description
While playing with Angular in dev mode I get stuck frequently at

Rerunning app with 'ng serve' resolves but it's annoying.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: