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
IVY dev server issues that vanish after restart #39868
Comments
Thanks for reporting. It sounds like you're experiencing #39431, which is a known issue at the moment. Can you check whether a second recompile would fix your issue? So change the template to get the errors, then insert a space or something to let it recompile, does that resolve the errors? |
Thanks for the fast response JoostK. I tried that a few times when I had this issue and it sadly didn't work. Today I had the issue with this simple string interpolation i used for testing something: {{formGroup.get("days")?.errors | json}} |
Thanks for the follow-up. If additional changes don't fix it, then I'm not sure if it's #39431. I would appreciate if you could extract some sort of reproduction, preferably a Github repo, so I can investigate further. I would love to get to the bottom of such issues, especially because it seems quite prevalent. |
Its so erratic, but the next time i get it I will try to backtrack my last steps as good as possible and see if i find a way of reproducing it in a minimal project - can't guarantee anything though, sorry :( |
In the meantime I came to realize that saving twice would indeed not help; you'll have to change the component's TS file to get rid of the error. This is being addressed in #39895. |
Hey JoostK, just had it again and can confirm that re-saving the TS file DOES help in these cases - thank you! I will use that as a workaround i guess. Tried to backtrack my last steps that lead to the error, but couldn't reproduce, not even with re-applying IntelliJs local history step by step :( |
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. |
Description
I have the following issue since using Ivy (i personally can confirm the issue exists on Angular 10 and 11).
There is some erratic behavior with Angular Ivy - sadly it's completely inconsistent (and i didn't find a way to reproduce it reliably), but it does happen quite often. I am running the dev-server with ng serve and every once in a while (usually after adding some HTML code) the compiler would puke out like 20 messages that make no sense - stuff like "Can't bind to 'ngIf' since it isn't a known property of 'div'". If I revert the most recent change, or comment out the last part of the HTML it works fine, but if i un-comment it the error comes back - reliably, at least in that matter - even if i repeat this 10 times. When i restart ng serve without changing any code the errors disappear though.
For me the issue happens on different PCs and different projects and with both Angular 10 and 11.
I talked to some colleagues and also asked arround on on reddit in this post and got responses that re-assure me that i am not the only one with that issue. Actually I am surprised that no issue exists for this, hopefully I didn't overlook it?
Unfortunately due to the "disappearing after restart" - nature of this bug it seems pointless to write a reproducer. I tried to forcible reproduce this error, but simply had no success - funny, since it haunts me to a point were i lost all trust into the compiler and just restart ng serve even before checking my code twice
🔥 Exception or Error
🌍 Your Environment
Angular Version:
The text was updated successfully, but these errors were encountered: