Reputation: 597
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
Upvotes: 23
Views: 59590
Reputation: 119
Please check module routing carefully. You may have declared same component both in declarations and imports.
play it in this way....
@NgModule({
declarations: [
FooterComponent,
NavbarComponent
],
imports: [
CommonModule,
],
exports:[
FooterComponent,
NavbarComponent
]
})
Upvotes: 7
Reputation: 29161
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.
Upvotes: 22