19.1.X NG0912: Incorrect Component ID collision warning · Issue #29408 · angular/angular-cli · GitHub
Skip to content

19.1.X NG0912: Incorrect Component ID collision warning #29408

Closed

Description

@Ruisi-Lu

Command

serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

"NG0912: Component ID generation collision detected" is being thrown incorrectly despite all component selectors and IDs being unique.

Minimal Reproduction

  1. Create a new Angular project using version 19.1.x
  2. Run dev server
  3. Continuously modify the app.component.html or the template of any other component.
  4. Observe the terminal for the NG0912 warning. It appears sporadically during rebuilds triggered by these template modifications.

Exception or Error

NG0912: Component ID generation collision detected. Components '_AppComponent' and '_AppComponent' with selector 'app-root' generated the same component ID. To fix this, you can change the selector of one of those components or add an extra host attribute to force a different ID. Find more at https://angular.dev/errors/NG0912

Your Environment

Enabled SSR

Angular CLI: 19.1.2
Node: 20.18.1
Package Manager: pnpm 10.0.0
OS: win32 x64

Angular: 19.1.1
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1901.2
@angular-devkit/build-angular   19.1.2
@angular-devkit/core            19.1.2
@angular-devkit/schematics      19.1.2
@angular/cli                    19.1.2
@angular/ssr                    19.1.2
@schematics/angular             19.1.2
rxjs                            7.8.1
typescript                      5.7.3
zone.js                         0.15.0

Anything else relevant?

No response

Activity

  1. transferred this issue fromangular/angular-clion Jan 20, 2025
  2. modified the milestone: needsTriage on Jan 20, 2025
  3. alan-agius4 commented on Jan 20, 2025

    @alan-agius4
  4. alan-agius4 commented on Jan 20, 2025

    @alan-agius4
  5. added a commit that references this issue on Jan 20, 2025
    0a271f4
  6. self-assigned this
    on Jan 20, 2025
  7. alan-agius4 commented on Jan 21, 2025

    @alan-agius4
    Collaborator
  8. angular-automatic-lock-bot commented on Feb 21, 2025

    @angular-automatic-lock-bot

    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.

  9. locked and limited conversation to collaborators on Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions