angular: After upgrade from angular 7 to 15 page rendering fails with error

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

core

Is this a regression?

Yes

Description

After upgrade from angular 7 to 15 page rendering fails with error

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/stackblitz-starters-xejxq3

Please provide the exception or error you saw

`RangeError: Invalid string length
    at Array.join (<anonymous>)
    at Array.toString (<anonymous>)
    at getOrCreateNodeInjectorForNode (vendor.js:239616:63)
    at initializeDirectives (vendor.js:247200:24)
    at resolveDirectives (vendor.js:247187:7)
    at elementStartFirstCreatePass (vendor.js:249740:3)
    at ɵɵelementStart (vendor.js:249774:41)
    at Module.ɵɵelement (vendor.js:249849:3)
    at PageaccruallistComponent_Template (src_ts_generated-sources_page-accrual-list_module_ts.js:91587:63)
    at executeTemplate (vendor.js:246773:5)`

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

Angular CLI: 15.2.10
Node: 14.21.1
Package Manager: npm 6.14.17
OS: win32 x64

Angular: 15.2.10
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1502.10
@angular-devkit/build-angular   15.2.10
@angular-devkit/core            15.2.10
@angular-devkit/schematics      15.2.10
@angular/cdk                    15.2.9
@schematics/angular             15.2.10
rxjs                            7.8.1
typescript                      4.9.5

Anything else?

No response

About this issue

  • Original URL
  • State: open
  • Created 7 months ago
  • Comments: 23 (6 by maintainers)

Most upvoted comments

any update on this issue? may be some workaround? is there a limit for child objects in ivy compiler?

Okay, this appears to fail because the number of child elements exceeds the bitsize that is available for children in an internal data structure.

In development mode, the following root cause error is reported:

ASSERTION ERROR: Parent injector must be pointing past HEADER_OFFSET. [Expected=> 22 > 4 <=Actual]

@JoostK angular 15 supports lower count of children than angular 7 ? Is that ok?

child-routing.module.ts uses RouterModule.forRoot but this should be forChild. Closing as an application issue.

@atscott

I’ve changed this, and it’s not helped

child-routing.module.ts uses RouterModule.forRoot but this should be forChild. Closing as an application issue.

@kochetkovSergeY if I were you I would migrate from v7 -> v8 first,… and so on

We are following the migration guide and we’ve almost finished the migration

I don’t see any point in switching to 8 and so on…