Skip to content

EffectsModule breaks on RxJS6 #949

@spock123

Description

@spock123

Hi,
after upgrading to the 6.0.0 beta.0 I am having issues with the effects module.

Even the simplest effects module with an empty array of effects still gives the following error when importing the EffectsModule:

..... misc imports

import { reducers } from './my-store';
let effects: Array<any> = [];

@NgModule({
  imports: [
    BrowserModule,
    RouterModule.forRoot(routes),
    StoreModule.forRoot(reducers),
    EffectsModule.forRoot(effects)
  ],
...

Notice the EffectsModule is called with no effects. If I remove the EffectsModule line everything works.
The error when including the EffectsModule is:

Error: StaticInjectorError(AppModule)[EffectsRootModule -> Store]: 
  StaticInjectorError(Platform: core)[EffectsRootModule -> Store]: 
    NullInjectorError: No provider for Store!

Dependencies:

Angular 6.0.0 RC.1
RxJS 6.0.0 RC.0
Ngrx/store, Ngrx/effects : 6.0.0-beta.0
Ngrx/core: 1.2.0 (now removed)
Typescript: 2.7.1 / 2.8.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions