When migrating my project from @ngrx 2.x to 4.1.0, I encountered the error message
NullInjectorError: No provider for Store!
The store was imported as shown in the docs:
import { StoreModule as NgRxStoreModule } from '@ngrx/store';
@NgModule({
  imports: [
    NgRxStoreModule.forRoot(reducerMap, {
      initialState: initial
    }),
    StoreRouterConnectingModule,
    EffectsModule.forRoot(effects)
  ],
  providers: [AppActions]
})
export class StoreModule {}
Turned out that some of my services imported the store via
import { Store } from '@ngrx/store/src/store'
Changing the imports to
import { Store } from '@ngrx/store'
fixed the problem.
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