Error map

ViewChild is undefined Angular: TypeError: Cannot read properties of undefined (reading 'nativeElement') — @ViewChild used in ngOnInit

Angular · layer 1, On your device

Open the full error page →

Centre: this error. First ring: errors it is linked with (7). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

ViewChild is undefined — Angular: TypeError: Cannot read properties of undefined (reading 'nativeElement') — @ViewChild used in ngOnInit (Angular)ViewChild i…NG0100 — Angular: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked (Angular)NG0100Cannot find control with name — Angular: Error: Cannot find control with name: 'email' (reactive forms) (Angular)Cannot find control…reading length — TypeError: Cannot read properties of undefined (reading 'length') (JavaScript)reading lengthSchema 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 f…NG0950 — Angular: NG0950: Input is required but no value is available yet (input.required / viewChild.required) (Angular)NG0950exceeded 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 bu…addEventListener on null — TypeError: Cannot read properties of null (reading 'addEventListener') (JavaScript)addEventListener on…NullInjectorError — Angular: NullInjectorError: No provider for X! (Angular)NullInjectorErrorNG8002 — Angular: NG8002: Can't bind to 'ngModel' since it isn't a known property of 'input' (Angular)NG8002TS2564 — TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor (TypeScript)TS2564NG8003 — Angular: NG8003: No directive found with exportAs 'ngForm' (template reference variable) (Angular)NG8003NG01203 — Angular: NG01203: No value accessor for form control with name: 'x' (ControlValueAccessor missing) (Angular)NG01203NG01050 — Angular: NG01050: formControlName must be used with a parent formGroup directive (Angular)NG01050TypeError — TypeError: Cannot read properties of undefined (reading 'x') (JavaScript)TypeErrorArrayIndexOutOfBoundsException — java.lang.ArrayIndexOutOfBoundsException: Index 5 out of bounds for length 5 (Java)ArrayIndexOutOfBoun…TypeError set undefined — TypeError: Cannot set properties of undefined (setting 'x') (JavaScript)TypeError set undef…NG0200 — Angular: NG0200: Circular dependency in DI detected for X (Angular)NG0200NG0201 — Angular: NG0201: No provider for X found in NodeInjector (Angular)NG0201NG0203 — 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)NG0203NG0600 — Angular: NG0600: Writing to signals is not allowed in a computed or an effect by default (Angular)NG0600Could 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 …ChunkLoadError — ChunkLoadError: Loading chunk 123 failed. (JavaScript)ChunkLoadErrorNG0300 — Angular: NG0300: Multiple components match node with tagname app-x: A and B (Angular)NG0300NG0500 — Angular SSR: NG0500: During hydration Angular expected <div> but found <span> (NG0501, NG0502) (Angular)NG0500TypeError not iterable — TypeError: x is not iterable (JavaScript)TypeError not itera…Object.keys null — TypeError: Cannot convert undefined or null to object (JavaScript)Object.keys nullinvalid selector — DOMException: Failed to execute 'querySelector' on 'Document': 'x' is not a valid selector (JavaScript)invalid selector

Directly related (7)

NG0100Angular

Angular: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked

A template value changed during the same change-detection cycle in which Angular already checked it (dev-mode only error).

Cannot find control with nameAngular

Angular: Error: Cannot find control with name: 'email' (reactive forms)

A `formControlName` points at a control that does not exist in the bound `FormGroup`.

reading lengthJavaScript

TypeError: Cannot read properties of undefined (reading 'length')

Code checked .length on something that is undefined — typically an array or string that hasn’t loaded.

Schema validation failed with the following errorsAngular

Angular CLI: Schema validation failed with the following errors: Data path "" must NOT have additional properties(xyz)

`angular.json` (or an option you passed to a builder) contains a property the schema does not allow — a typo, an option removed i…

NG0950Angular

Angular: NG0950: Input is required but no value is available yet (input.required / viewChild.required)

A required signal input or query was read before Angular set it — in the constructor or too early in the lifecycle.

exceeded maximum budgetAngular

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

The production build is larger than the size limits (budgets) in angular.json, and the build is configured to fail.

addEventListener on nullJavaScript

TypeError: Cannot read properties of null (reading 'addEventListener')

document.querySelector/getElementById returned null, so the element doesn’t exist when the script runs.

Two steps away (20)

NullInjectorErrorAngular

Angular: NullInjectorError: No provider for X!

Angular’s dependency injection couldn’t find a provider for a service/token the component needs.

NG8002Angular

Angular: NG8002: Can't bind to 'ngModel' since it isn't a known property of 'input'

The template uses a property binding that no imported directive provides — for ngModel, FormsModule isn’t imported.

TS2564TypeScript

TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor

With strictPropertyInitialization on, a class property declared without ? or a default isn’t set in the constructor.

NG8003Angular

Angular: NG8003: No directive found with exportAs 'ngForm' (template reference variable)

A template reference such as `#f="ngForm"` points at a directive Angular cannot find on that element — the module that provides i…

NG01203Angular

Angular: NG01203: No value accessor for form control with name: 'x' (ControlValueAccessor missing)

A form directive (`formControlName`, `ngModel`) is on an element or component that Angular cannot read/write values from.

NG01050Angular

Angular: NG01050: formControlName must be used with a parent formGroup directive

`formControlName` is used outside any `[formGroup]` — the control has no form to belong to.

TypeErrorJavaScript

TypeError: Cannot read properties of undefined (reading 'x')

You tried to access a property on a value that is `undefined` (or `null`) — usually data that hasn’t loaded yet or a wrong proper…

ArrayIndexOutOfBoundsExceptionJava

java.lang.ArrayIndexOutOfBoundsException: Index 5 out of bounds for length 5

Code accessed an array index outside 0 … length-1.

TypeError set undefinedJavaScript

TypeError: Cannot set properties of undefined (setting 'x')

Code assigned a property on a value that is undefined (or null).

NG0200Angular

Angular: NG0200: Circular dependency in DI detected for X

Two or more services inject each other (directly or through a chain), so Angular cannot create any of them first.

NG0201Angular

Angular: NG0201: No provider for X found in NodeInjector

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

NG0203Angular

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

`inject()` was called somewhere Angular is not constructing a class — for example inside a method, a callback or after an `await`.

NG0600Angular

Angular: NG0600: Writing to signals is not allowed in a computed or an effect by default

A `computed()` (or, by default, an `effect()`) tried to call `.set()` or `.update()` on a signal — that creates hidden update loo…

Could not find the builder's node packageAngular

Angular CLI: Could not find the '@angular-devkit/build-angular:browser' builder's node package / Cannot find module '@angular-devkit/build-angular/package.json'

The build tooling package is missing from `node_modules` — dependencies were not installed or the lockfile/install is broken.

ChunkLoadErrorJavaScript

ChunkLoadError: Loading chunk 123 failed.

A lazily loaded JavaScript chunk couldn’t be downloaded — usually because a new deployment removed the old hashed files.

NG0300Angular

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

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

NG0500Angular

Angular SSR: NG0500: During hydration Angular expected <div> but found <span> (NG0501, NG0502)

The HTML rendered on the server does not match what the browser's Angular app tried to render, so hydration failed and the page w…

TypeError not iterableJavaScript

TypeError: x is not iterable

for…of, spread or destructuring was used on something that isn’t an array/iterable.

Object.keys nullJavaScript

TypeError: Cannot convert undefined or null to object

Object.keys/entries/assign was called with undefined or null.

invalid selectorJavaScript

DOMException: Failed to execute 'querySelector' on 'Document': 'x' is not a valid selector

The CSS selector string is invalid — often an ID starting with a digit or containing special characters.