Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular 14, ng serve error - @ngtools/webpack/src/ivy/index.js - Error: Maximum call stack size exceeded

I'm working with angular 14 and node 16 and typescript. I was working normally, but now when i execute the ng serve command, i get the following error:

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

here is my ng version

enter image description here

like image 669
YeisonM Avatar asked Sep 13 '25 15:09

YeisonM


2 Answers

check the modules import , you may have circular importation

like image 56
Ilyas Ayuubi Avatar answered Sep 15 '25 06:09

Ilyas Ayuubi


I got this error, as I stupidly included a package in both declarations and imports in my app.module.ts file:

@NgModule({
  declarations: [
    CanvasJSChart,
    . . .
  ],
  imports: [
    CanvasJSChart,
    . . .

Moral of the story: don't drink and code.

like image 34
Mike Gledhill Avatar answered Sep 15 '25 04:09

Mike Gledhill