Build at: 2022-09-14T11:34:20.503Z - Hash: c51f599b4586fb6d - Time: 7780ms
./src/main.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): Error: Emit
./src/polyfills.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): Error: Emit
Error: Failed to initialize Angular compilation - Cannot read properties of null (reading 'fileName')
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
× Failed to compile.
Check this One, May be helpful Basic reason behind this can be... Recursive calls to some modules.
for e.g.
@NgModule({
declarations: [],
imports: [
CommonModule,
MatSliderModule,
MaterialModule
],
exports:[MatSliderModule]
})
export class MaterialModule { }
Here, Same MaterialModule is importing self. It increases the the call stack and results into the above mentioned error.
This is one condition. There can be other conditions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With