./src/main.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): Error: Maximum call stack size exceeded
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { AppModule } from './app/app.module';
platformBrowserDynamic().bootstrapModule(AppModule) .catch(err => console.error(err));
Almost always
Maximum call stack size exceeded
error is the consquence of an infinite loop. Given information doesn't point to a possible place in the code that triggers it.The call stack of the error should give enough information to find the source of your error though.
Additionally, please make sure that you did not add any components, directives, and pipes in the import array of modules.