Thanks to visit codestin.com
Credit goes to github.com

Skip to content

after upgrading to ng@20 getting a ERROR TypeError: Cannot read properties of undefined (reading 'hasOwnProperty') in the debug module #63774

@phillipwildhirt

Description

@phillipwildhirt

Which @angular/* package(s) are the source of the bug?

Don't known / other

Is this a regression?

Yes

Description

My dashboard module is booting up and the component template has an array of component outlets. 2 of the components show up, but the 3rd will not. All three have worked successfully under all previous versions. And even stranger, 1 of them showing up is nearly identical in its providers, injected services. However, the error is deep in the bowels of the debug_node module (see error). And I don't see what is happening here.

Does anyone have insight into what has changed in the component factory for ngComponentOutlet that would cause this?

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

dashboard-view.service.ts:288 ERROR TypeError: Cannot read properties of undefined (reading 'hasOwnProperty')
    at bloomAdd (debug_node.mjs:1489:19)
    at diPublicInInjector (debug_node.mjs:1612:5)
    at resolveProvider (debug_node.mjs:28037:17)
    at resolveProvider (debug_node.mjs:28015:13)
    at providersResolver (debug_node.mjs:28002:9)
    at definition.providersResolver (debug_node.mjs:28278:20)
    at initializeDirectives (debug_node.mjs:12447:17)
    at resolveDirectives (debug_node.mjs:12392:9)
    at directiveHostFirstCreatePass (debug_node.mjs:12776:9)
    at _ComponentFactory.create (debug_node.mjs:13481:35)
handleError @ root_effect_scheduler.mjs:3597
(anonymous) @ debug_node.mjs:30632
invoke @ zone.js:398
run @ zone.js:113
runOutsideAngular @ debug_node.mjs:16582
(anonymous) @ debug_node.mjs:30624
(anonymous) @ debug_node.mjs:30560
invoke @ zone.js:398
onInvoke @ debug_node.mjs:16691
....
bootstrapModule @ core.mjs:1098
(anonymous) @ main.ts:16

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 20.3.1
Node: 22.19.0
Package Manager: npm 10.9.3
OS: darwin arm64
    

Angular: 20.3.0
... animations, common, compiler, compiler-cli, core, elements
... forms, localize, platform-browser, platform-browser-dynamic
... router

Package                         Version
---------------------------------------
@angular-devkit/architect       0.2003.1
@angular-devkit/build-angular   20.3.1
@angular-devkit/core            20.3.1
@angular-devkit/schematics      20.3.1
@angular/cdk                    20.2.3
@angular/cli                    20.3.1
@angular/material               20.2.3
@schematics/angular             20.3.1
rxjs                            7.8.2
typescript                      5.9.2
zone.js                         0.15.1

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreIssues related to the framework runtimeneeds reproductionThis issue needs a reproduction in order for the team to investigate further

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions