Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Angular’s NG0919 means it detected a runtime circular dependency among components, directives, or pipes. Follow the imports from the types named in the error until a path returns to its starting point, then remove that runtime cycle—usually by extracting shared code, replacing a type-only import with import type, or restructuring the component relationships.
What NG0919 means
Angular describes NG0919 as a circular dependency between components, directives, or pipes. One file can import another, which eventually imports the first file again. The cycle may be direct—Component A imports Component B and B imports A—or indirect, such as Component A → Component B → Component C → Component A. Either form can prevent proper initialization.
The runtime message documented by Angular can begin Cannot read @Component metadata. Angular also notes that older versions might instead report Cannot read properties of undefined (reading 'ɵcmp'). The wording can vary by Angular version, so use the error code and referenced files to guide your diagnosis. Angular’s NG0919 reference provides the official description and examples.
How to find the import cycle
- Read the full runtime error. Note any component metadata and file references. These point to a useful starting place, but the cycle may include other files not named in the message.
- Trace imports through the source files. Follow each relevant component, directive, or pipe import into the next file. Keep going until you find a path back to a file already visited. Check intermediate files as well as direct imports.
- For a large TypeScript source tree, scan with Madge. From the project root, run
madge --circular --extensions ts ./srcto list circular imports. To create a graph, runmadge --circular --extensions ts ./src --image graph.svg. These commands are suggested in the Angular NG0919 documentation. Use the output to locate the cycle; the repair is to remove the problematic runtime dependency.
How to break the cycle
Move shared functionality into a neutral file
If two components depend on the same helper, constant, or other shared logic, put it in a separate file that neither component imports back through the other. Then both can depend on that file without depending on each other. Keep the extracted module independent of both participants; otherwise the cycle may simply move.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
Use a type-only import when you need only a TypeScript type
If a reference exists solely to express a type and is not needed at runtime, use import type. Angular explains that type-only imports are erased at compile time and therefore do not add a runtime circular dependency. This is not a fix when the code actually needs the imported value at runtime.
Restructure the component hierarchy
If components import one another because their responsibilities or relationships are tangled, revise the design so one does not need a runtime reference back to the other. Extracting shared behavior or changing which component owns a responsibility can remove the dependency rather than hiding it.
Rank #2
Make sure the error is NG0919, not another Angular cycle diagnostic
Angular has other cycle-related errors, but they describe different phases and dependencies. Confirm the code before choosing a fix:
| Error | Where the cycle occurs | What to investigate |
|---|---|---|
| NG0919 | Runtime dependency among components, directives, or pipes. | Trace the source import chain and remove the runtime cycle. |
| NG0200 | Dependency injection: services directly or indirectly depend on themselves. | Follow the service dependency path and refactor the relationships. Angular recommends restructuring first; events may replace direct dependencies where suitable, while lazy injection is a last resort. See the NG0200 troubleshooting guide. |
| NG3003 | A separately classified compiler error: “Import Cycle Detected.” | Use the compiler diagnostic and its context rather than assuming the runtime NG0919 repair path applies. See the NG3003 error reference. |
When Angular DevTools can help
Angular DevTools’ Injector Tree visualizes injector hierarchy and resolution paths. Its documentation says the tool is available for Angular applications built with version 17 or higher. It is relevant when investigating injector behavior, particularly a DI issue such as NG0200; it does not replace tracing source imports to fix NG0919. Angular DevTools documentation describes the Injector Tree.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
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.




