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
angular ngrx


source to share


No one has answered this question yet

Check out similar questions:

27
Angular 2 Routing not working when deploying to Http server
five
$ Injector error on angular upgrade from 1.6.6 to 6
4
Angular Build Error 4: Error while detecting static symbol values
3
Multiple Angular4 module problem
3
Ngrx filter with filter
2
Browser field does not contain a valid alias configuration compilation error
1
a routing method that does not redirect to the target component
1
Error when using ngx-hm-carousel module while creating ng -prod
0
Angular build error --prod
0
corner 4 Production



All Articles
Loading...
X
Show
Funny
Dev
Pics