Angular’s NG05104 runtime error means it could not find the DOM element for the component it was asked to bootstrap. Check which component the application starts, then make sure the loaded page contains an element whose tag matches that component’s selector.
What NG05104 means
Angular raises NG05104, “Root element was not found”, when it tries to initialize a component but cannot find its corresponding node in the DOM. The component Angular initializes is identified either by an NgModule’s bootstrap property or, for a standalone application, by the component passed to bootstrapApplication. Angular lists NG05104 as a runtime error in its Error Encyclopedia.
As an Amazon Associate I earn from qualifying purchases.
How to find and fix the mismatch
-
Identify the bootstrap component. Find the component named in the NgModule’s
bootstrapproperty, or the first argument supplied tobootstrapApplication.What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Check its selector. In that component’s definition, note the value of
selector. Angular’s documented example usesmy-app.#1 Best Overall
-
Check the page’s root tag. Inspect the HTML loaded by the application and find the element intended to host the bootstrapped component. Its tag must match the selector. In Angular’s example,
<app-root></app-root>does not match the selectormy-app; changing the HTML to<my-app></my-app>resolves that mismatch. -
Verify the actual page Angular loads. Make the check against the HTML served to the application, not just a similarly named or unused template. The error concerns the DOM Angular is trying to bootstrap.
Why checking the bootstrap target matters
A selector mismatch is the cause illustrated on Angular’s official error page, not proof that every NG05104 incident has the same cause. Confirm the application’s actual bootstrap configuration and the DOM it loads; compare those two specific pieces rather than changing a tag based on an assumed root component.
Quick Recap
Rank #4
Rank #3
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




