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

Angular: NG04014: Invalid configuration of route 'x': one of the following must be provided: component, loadComponent, redirectTo, children or loadChildren

A route object has a path but nothing for the router to render or load.

Exact message you may see Invalid configuration of routeOne of the following must be provided: component, loadComponent, redirectTo, children or loadChildrenInvalid configuration of route '': redirectTo and pathNG04014: Invalid configuration of route
Seen on: Angular TypeScript

Meaning

Each route needs at least one of component, loadComponent, redirectTo, children or loadChildren (plus pathMatch: 'full' for empty-path redirects). Typos in property names (componet) and empty objects are common.

Common causes

  • Route without component, loadComponent, redirectTo, children or loadChildren
  • Misspelled property name in the route object
  • redirectTo without pathMatch: 'full' on an empty path
  • loadChildren returning the wrong export (module/routes name)
  • Empty route object left from a merge

⚡ Quick fix

  1. Add one of the required properties to the route
  2. Fix typos in route properties
  3. Use pathMatch: 'full' for '' redirects

Detailed fix by platform

Angular

  1. { path: '', redirectTo: 'home', pathMatch: 'full' } and { path: 'home', loadComponent: () => import('./home').then(m => m.HomeComponent) }

Code examples

Valid route shapes

typescript
export const routes: Routes = [
  { path: '', redirectTo: 'home', pathMatch: 'full' },
  { path: 'home', loadComponent: () => import('./home.component').then(m => m.HomeComponent) },
  { path: 'blog', children: [{ path: ':slug', component: PostComponent }] },
];

How to diagnose

  1. Route — Which path is named?
  2. Properties — Does it have component/loadComponent/redirectTo/children?
  3. Export — Does loadChildren return the right symbol?

🔧 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):

Cannot find control with name — Angular: Error: Cannot find control with name: 'email' (reactive forms) (Angular)Cannot find control w…Cannot GET /route on refresh — Angular (production): Cannot GET /dashboard — 404 when refreshing or opening a deep link (Angular)Cannot GET /route on …Could not find the builder's node package — Angular CLI: Could not find the '@angular-devkit/build-angular:browser' builder's node package / Cannot find module '@angular-devkit/build-angular/package.json' (Angular)Could not find the bu…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…NG04002 — Angular: NG04002: Cannot match any routes. URL Segment: 'x' (Angular)NG04002NullInjectorError: No provider for ActivatedRoute! — Angular: NullInjectorError: No provider for ActivatedRoute! (also Router) — usually a unit test (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…NG04014

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.