NG0201 Angular Origin: On your device Last updated 15 Oct 2026

Angular: NG0201: No provider for X found in NodeInjector

A component or directive asked for a service no injector in its tree provides.

Exact message you may see NG0201: No provider forNo provider for X found in NodeInjectorNo provider for ControlContainer found in NodeInjectorNo provider for NgControl found in NodeInjector
Seen on: Angular TypeScript

Meaning

Unlike the older NullInjectorError, this message comes from the element injector (a component, directive or pipe). Provide the service with providedIn: 'root', in the component's providers, or in the route/bootstrap providers.

Common causes

  • Service lacks @Injectable({ providedIn: 'root' }) and is not in any providers
  • Provider declared in a lazy-loaded module/route not covering this component
  • A directive/pipe injecting a token that must be provided by its host (for example NgControl)
  • Parent-only token injected with the wrong @Host/@Optional flags
  • Test module without the required provider

⚡ Quick fix

  1. Add providedIn: 'root' or list the service in providers
  2. Provide it at the right level (route, component or bootstrapApplication)
  3. Add the provider to the TestBed in tests

Detailed fix by platform

Angular

  1. @Injectable({ providedIn: 'root' }) on the service
  2. Bootstrap: bootstrapApplication(AppComponent, { providers: [provideHttpClient()] })

Code examples

Provide at the right level

typescript
@Component({
  selector: 'app-cart',
  standalone: true,
  providers: [CartService],           // component-level instance
  template: `...`,
})
export class CartComponent { cart = inject(CartService); }

How to diagnose

  1. Token — Which service or token is named?
  2. Provider — Where is it provided?
  3. Tree — Is the component inside that provider's scope?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

exceeded maximum budget — Angular build: Error: bundle initial exceeded maximum budget. Budget 1.00 MB was not met by 120.00 kB with a total of 1.12 MB (Angular)exceeded maximum budg…NG0200 — Angular: NG0200: Circular dependency in DI detected for X (Angular)NG0200NG0203 — Angular: NG0203: inject() must be called from an injection context such as a constructor, a factory function, a field initializer or a function used with runInInjectionContext (Angular)NG0203NullInjectorError — Angular: NullInjectorError: No provider for X! (Angular)NullInjectorErrorNullInjectorError: No provider for ActivatedRoute! — Angular: NullInjectorError: No provider for ActivatedRoute! (also Router) — usually a unit test (Angular)NullInjectorError: No…NullInjectorError: No provider for HttpClient! — Angular: NullInjectorError: No provider for HttpClient! — provideHttpClient() missing (Angular)NullInjectorError: No…Schema validation failed with the following errors — Angular CLI: Schema validation failed with the following errors: Data path "" must NOT have additional properties(xyz) (Angular)Schema validation fai…NG0201

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.