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
// ....
],