Skip to content

ERROR: Maximum Call Size Exceeded when Upgraded from Ang V14 -> 15 #26969

Description

@SyedSalmanNizami

Command

serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

14

Description

Initially had upgraded from Angular 13 -> 14 and it went smooth . Now tried to upgrade to v15 and I face a peculiar issue stating Maximum Call Size Exceeded.

npm start

cpam-angular-frontend@0.1.0 start
ng serve

✔ Browser application bundle generation complete.

Initial Chunk Files | Names | Raw Size
styles.css, styles.js | styles | 2.83 MB |
scripts.js | scripts | 1.41 MB |
polyfills.js | polyfills | 209.30 kB |
vendor.js | vendor | 208.59 kB |
runtime.js | runtime | 6.54 kB |
main.js | main | 894 bytes |

                  | Initial Total |   4.66 MB

Build at: 2024-01-26T09:34:14.596Z - Hash: 8b20185a12f7d4df - Time: 14565ms

./src/main.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Maximum call stack size exceeded

./src/polyfills.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Maximum call stack size exceeded

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

× Failed to compile.


It Doesn't provide any Information regarding which specific location is causing the issue. So any help to resolve this would be much appreciated.

Minimal Reproduction

npm start

cpam-angular-frontend@0.1.0 start
ng serve

✔ Browser application bundle generation complete.

Initial Chunk Files | Names | Raw Size
styles.css, styles.js | styles | 2.83 MB |
scripts.js | scripts | 1.41 MB |
polyfills.js | polyfills | 209.30 kB |
vendor.js | vendor | 208.59 kB |
runtime.js | runtime | 6.54 kB |
main.js | main | 894 bytes |

                  | Initial Total |   4.66 MB

Build at: 2024-01-26T09:34:14.596Z - Hash: 8b20185a12f7d4df - Time: 14565ms

./src/main.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Maximum call stack size exceeded

./src/polyfills.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Maximum call stack size exceeded

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

× Failed to compile.

Exception or Error

No response

Your Environment

ng version

     _                      _                 ____ _     ___ 
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | | 
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | | 
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 15.2.10
Node: 18.17.1
Package Manager: npm 10.0.0
OS: win32 x64

Angular: 15.2.10
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... 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.0.0
@schematics/angular             15.2.10
rxjs                            6.5.3
typescript                      4.8.2

Anything else relevant?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions