Skip to content

IVY dev server issues that vanish after restart #39868

@matrium0

Description

@matrium0

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


Error: src/app/administration/administration.module.ts:30:292 - error NG6001: The class 'SerienTerminComponent' is listed in the declarations of the NgModule 'AdministrationModule', but is not a directive, a component, or a pipe. Either remove it from the NgModule's declarations, or add an appropriate Angular decorator.

....

src/app/administration/termin/serien-termin/serien-termin.component.html:1:7 - error NG8002: Can't bind to 'formGroup' since it isn't a known property of 'form'

... (like 20 more errors)

🌍 Your Environment

Angular Version:


Angular CLI: 11.0.1
Node: 14.15.0
OS: win32 x64

Angular: 11.0.0
... animations, cdk, common, compiler, compiler-cli, core, forms
... localize, material, material-moment-adapter
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1100.1
@angular-devkit/build-angular   0.1100.1
@angular-devkit/core            11.0.1
@angular-devkit/schematics      11.0.1
@angular/cli                    11.0.1
@schematics/angular             11.0.1
@schematics/update              0.1100.1
rxjs                            6.6.3
typescript                      4.0.5

but as explained above this also happens on Angular 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: compilerIssues related to `ngc`, Angular's template compilerneeds: clarificationThis issue needs additional clarification from the reporter before the team can investigate.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions