1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Getting ERROR TypeError: Cannot read properties of undefined (reading 'ɵcmp') after Change the...

Discussão em 'Angular' iniciado por Mohammadreza Imani, Junho 10, 2025.

  1. recently I have update my angular to 19 but, for some reason I had to also migrate from browser builder to application builder, after I fixed all the circular dependencies in my app, now I am getting this weird error

    ERROR TypeError: Cannot read properties of undefined (reading 'ɵcmp')
    at getComponentDef (core.mjs:1663:10)
    at extractDirectiveDef (core.mjs:19345:10)
    at core.mjs:19555:96
    at Array.map (<anonymous>)
    at core.mjs:19555:85
    at createTView (core.mjs:11933:59)
    at getOrCreateComponentTView (core.mjs:11971:24)
    at createComponentLView (core.mjs:12001:17)
    at instantiateAllDirectives (core.mjs:12389:5)
    at createDirectivesInstances (core.mjs:12197:3)
    | Promise.then | |
    -- | -- | -- | --
    | step | @ | chunk-YRJTWU7C.js:86
    | (anonymous) | @ | chunk-YRJTWU7C.js:87
    | __async | @ | chunk-YRJTWU7C.js:71
    | fulfilled | @ | chunk-YRJTWU7C.js:74
    | Promise.then | |
    | (anonymous) | @ | chunk-YRJTWU7C.js:87
    | __async | @ | chunk-YRJTWU7C.js:71
    | getSiteProperties | @ | app.component.ts:362
    | _AppComponent | @ | app.component.ts:161
    | AppComponent_Factory | @ | app.component.ts:123
    | Zone - Promise.then | |
    | (anonymous) | @ | localize-router.parser.ts:146
    | fulfilled | @ | chunk-YRJTWU7C.js:74
    | Zone - Promise.then | |
    | step | @ | chunk-YRJTWU7C.js:86
    | fulfilled | @ | chunk-YRJTWU7C.js:74
    | Promise.then | |
    | step | @ | chunk-YRJTWU7C.js:86
    | fulfilled | @ | chunk-YRJTWU7C.js:74
    | Promise.then | |
    | step | @ | chunk-YRJTWU7C.js:86
    | fulfilled | @ | chunk-YRJTWU7C.js:74
    | Promise.then | |
    | step | @ | chunk-YRJTWU7C.js:86
    | fulfilled | @ | chunk-YRJTWU7C.js:74
    | Promise.then | |
    | step | @ | chunk-YRJTWU7C.js:86
    | fulfilled | @ | chunk-YRJTWU7C.js:74
    | Promise.then | |
    | step | @ | chunk-YRJTWU7C.js:86
    | fulfilled | @ | chunk-YRJTWU7C.js:74
    | Promise.then | |
    | step | @ | chunk-YRJTWU7C.js:86
    | (anonymous) | @ | chunk-YRJTWU7C.js:87
    | __async | @ | chunk-YRJTWU7C.js:71
    | fulfilled | @ | chunk-YRJTWU7C.js:74
    | Promise.then | |
    | (anonymous) | @ | chunk-YRJTWU7C.js:87
    | __async | @ | chunk-YRJTWU7C.js:71
    | init | @ | localize-router.parser.ts:67
    | (anonymous) | @ | localize-router.parser.ts:478
    | load | @ | localize-router.parser.ts:477
    | appInitializer | @ | localize-router.module.ts:39
    | (anonymous) | @ | localize-router.module.ts:119
    | onDeviceReady | @ | main.ts:21
    | (anonymous) | @ | main.ts:30


    any Ideas why this happens? is it related to this library or something else is wrong? I have fixed also all the circular dependencies using

    thanks

    npx madge --circular --extensions ts ./src
    Processed 1260 files (39.1s) (583 warnings)

    ✔ No circular dependency found!


    I reverted my builder to browser and the issue is fixed, but I need to use application builder to be able to silent the new sass warnings

    Continue reading...

Compartilhe esta Página