How to debug error in module.ngfactory.ts

I have an app built with Angular 2, Angular CLI and ngrx, it works fine with ng serve

and ng build

but ng build --prod

fails:

ERROR in /webapp/src/$$_gendir/app/app.module.ngfactory.ts (229,102): Property 'stateReducer' does not exist on type 'typeof "/webapp/src/app/app.module"'.

I understand that app.module.ngfactory.ts

is a file that Angular generates from my file app.module.ts

and I am a little bit puzzled as to how to debug it other than doing a binary search to find that commit introduced a failure ...

app.module.ts

as follows:

@NgModule({
  declarations: [
    AppComponent,
    AuthComponent
  ],
  imports: [
    StoreModule.provideStore({stateReducer}),
    BrowserModule,
    FormsModule,
    HttpModule
  ],
  providers: [MyService],
  bootstrap: [AppComponent]
})
export class AppModule { }

      

Can anyone provide some advice on how to debug this kind of error?

+3


source to share





All Articles