angular/angular · error · RuntimeError
DEF_TYPE_UNDEFINED
DEF_TYPE_UNDEFINED
Error message
Cannot read ${symbolType} metadata. This can indicate a runtime circular dependency in your app that needs to be resolved. What it means
Error "Cannot read ${symbolType} metadata. This can indicate a runtime circular dependency in your app that needs to be resolved." thrown in angular/angular.
Source
Thrown at packages/core/src/render3/def_getters.ts:68
`Type ${stringify(type)} does not have 'ɵdir' property.`,
);
}
return def;
}
export function getDirectiveDef<T>(type: any): DirectiveDef<T> | null {
assertTypeDefined(type, '@Directive');
return type[NG_DIR_DEF] || null;
}
export function getPipeDef<T>(type: any): PipeDef<T> | null {
assertTypeDefined(type, '@Pipe');
return type[NG_PIPE_DEF] || null;
}
function assertTypeDefined(type: any, symbolType: string): void {
if (type == null) {
throw new RuntimeError(
RuntimeErrorCode.DEF_TYPE_UNDEFINED,
(typeof ngDevMode === 'undefined' || ngDevMode) &&
`Cannot read ${symbolType} metadata. This can indicate a runtime ` +
`circular dependency in your app that needs to be resolved.`,
);
}
}
/**
* Checks whether a given Component, Directive or Pipe is marked as standalone.
* This will return false if passed anything other than a Component, Directive, or Pipe class
*
* @param type A reference to a Component, Directive or Pipe.
* @publicApi
*/
export function isStandalone(type: Type<unknown>): boolean {
const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);
return def !== null && def.standalone;View on GitHub (pinned to 51cb07e980)
Solutions
- Resolve the runtime circular dependency (restructure imports or use forwardRef).
When it happens
Trigger: Thrown at packages/core/src/render3/def_getters.ts:68 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of angular/angular@51cb07e980 (2026-08-22).
Data as JSON: /api/errors/0a659649838f3a35.
Report an issue: GitHub.