For anyone facing this same error, my situation was that I have double commas in the imports section
imports: [
BrowserModule,
HttpModule,
FormsModule,
RouterModule.forRoot(appRoutes), , // <-- this was the error
// ....
],
Make sure the modules don't import each other. So, there shouldn't be
In Module A: imports[ModuleB]
In Module B: imports[ModuleA]
This can be caused by multiple scenarios like
imports: [
BrowserModule
,routing <= Missing Comma
,FeatureComponentsModule
],
imports: [
BrowserModule,
,routing <=Double Comma
,FeatureComponentsModule
],
I had the same problem. In my case, the reason is an extra comma.
None of the above solutions worked for me, but simply stopping and running "ng serve" again.
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