# Angular: NG0300: Multiple components match node with tagname app-x: A and B

**Code:** `NG0300` · **Category:** Angular · **Seen on:** Angular, TypeScript

Two components in scope share the same selector, so Angular cannot decide which one renders for that tag.

## Meaning

A given element can be matched by only one component. It happens when two components (or modules) declare the same selector, when a duplicate component is imported twice through different NgModules, or when a library component clashes with yours.

## Common causes

- Two components with identical `selector` values in scope
- The same component declared in two NgModules
- Own component selector clashes with a library one (`app-button` vs a UI kit)
- Copy-pasted component not renamed
- Standalone import list containing two components with one selector

## Quick fix

1. Give each component a unique selector prefix
2. Remove one of the duplicate imports/declarations
3. Search the project for the selector named in the message

## Detailed fix by platform

### Angular CLI

1. Search quickly: `grep -rn "selector: 'app-x'" src/`
2. Set a project prefix in angular.json (`"prefix": "acme"`) and regenerate

## How to diagnose

1. **Selector** — Which two components are named?
2. **Scope** — Where are both imported or declared?
3. **Origin** — Library or own code?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/angular/ng0300-multiple-components-match-node)
