Skip to content

Uncaught TypeError: Cannot read property 'ɵcmp' of undefined #36279

@Marka83

Description

@Marka83

🐞 bug report

Is this a regression?

I don't know. I've tried with 9.0.7 and 9.1.0, but it works the same. I haven't tested earlier versions.

Description

We migrated application from 8.2.3 to 9.1.
ng build and ng serve works as expected and application works with no errors.
When we build with ng build --prod everything goes fine - no errors.
But in production it throws this exception on loading of application:

Uncaught TypeError: Cannot read property 'ɵcmp' of undefined
at Object.yA (vendor.a5630b07ff8c3731c011.js:1)
at Object.mTkS (main.b71bfbef186c603a7db8.js:1)
at a (runtime.081b9fa9cdbc29e694e9.js:1)
at Object.vkcX (main.b71bfbef186c603a7db8.js:1)
at a (runtime.081b9fa9cdbc29e694e9.js:1)
at Object.j0Xk (main.b71bfbef186c603a7db8.js:1)
at a (runtime.081b9fa9cdbc29e694e9.js:1)
at Object.vtpD (main.b71bfbef186c603a7db8.js:1)
at a (runtime.081b9fa9cdbc29e694e9.js:1)
at Object.vY5A (main.b71bfbef186c603a7db8.js:1)

In vendor chunk. I explicitly set "vendorChunk": true, but even with false error is only reported in main.

🔬 Minimal Reproduction

I can't share code. I could only try to create some new project, but I would have to use every external library to try to find what is causing error.

🔥 Exception or Error


Uncaught TypeError: Cannot read property 'ɵcmp' of undefined
    at Object.yA (vendor.a5630b07ff8c3731c011.js:1)
    at Object.mTkS (main.b71bfbef186c603a7db8.js:1)
    at a (runtime.081b9fa9cdbc29e694e9.js:1)
    at Object.vkcX (main.b71bfbef186c603a7db8.js:1)
    at a (runtime.081b9fa9cdbc29e694e9.js:1)
    at Object.j0Xk (main.b71bfbef186c603a7db8.js:1)
    at a (runtime.081b9fa9cdbc29e694e9.js:1)
    at Object.vtpD (main.b71bfbef186c603a7db8.js:1)
    at a (runtime.081b9fa9cdbc29e694e9.js:1)
    at Object.vY5A (main.b71bfbef186c603a7db8.js:1)

🌍 Your Environment

Angular Version:


Angular: 9.0.7
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, platform-server, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.7
@angular-devkit/build-angular     0.900.7
@angular-devkit/build-optimizer   0.900.7
@angular-devkit/build-webpack     0.900.7
@angular-devkit/core              9.1.0
@angular-devkit/schematics        9.0.7
@angular/cdk                      9.0.1
@ngtools/webpack                  9.0.7
@schematics/angular               9.0.7
@schematics/update                0.900.7
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.2




Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workaroundarea: compilerIssues related to `ngc`, Angular's template compilerfreq1: lowneeds reproductionThis issue needs a reproduction in order for the team to investigate furtherneeds: clarificationThis issue needs additional clarification from the reporter before the team can investigate.regressionIndicates than the issue relates to something that worked in a previous versiontype: bug/fix

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions