ngrx / store

RxJS powered state management for Angular applications, inspired by Redux
MIT License
3.9k stars 311 forks source link

Error in combineReducers updating to Angular 4 #378

Closed pjpenast closed 7 years ago

pjpenast commented 7 years ago

Hello, I have updated my project to Angular 4 and I had the following execution error:

TypeError: Cannot convert undefined or null to object at Function.keys (<anonymous>) at combineReducers (utils.js:2) at _initialReducerFactory (ng2.js:15) at AppModuleInjector.get (ng:///AppModule/module.ngfactory.js:131) at AppModuleInjector.getInternal (ng:///AppModule/module.ngfactory.js:434) at AppModuleInjector.NgModuleInjector.get (core.es5.js:3762) at _createReducerIfExtension (instrument.js:40) at AppModuleInjector.createInternal (ng:///AppModule/module.ngfactory.js:220) at AppModuleInjector.NgModuleInjector.create (core.es5.js:3743) at NgModuleFactory.create (core.es5.js:3716) at core.es5.js:4954 at ZoneDelegate.invoke (zone.js:365) at Object.onInvoke (core.es5.js:4331) at ZoneDelegate.invoke (zone.js:364) at Zone.run (zone.js:125) at NgZone.run (core.es5.js:4200) at PlatformRef_._bootstrapModuleFactoryWithZone (core.es5.js:4952) at core.es5.js:4993 at ZoneDelegate.invoke (zone.js:365) at Zone.run (zone.js:125) at zone.js:760 at ZoneDelegate.invokeTask (zone.js:398) at Zone.runTask (zone.js:165) at drainMicroTaskQueue (zone.js:593) at HTMLDocument.ZoneTask.invoke (zone.js:464)

This is my dependencies in the package.json:

  "dependencies": {
    "@angular/common": "4.0.1",
    "@angular/compiler": "4.0.1",
    "@angular/core": "4.0.1",
    "@angular/forms": "4.0.1",
    "@angular/http": "4.0.1",
    "@angular/platform-browser": "4.0.1",
    "@angular/platform-browser-dynamic": "4.0.1",
    "@angular/router": "4.0.1",
    "@angularclass/hmr": "1.2.2",
    "@angularclass/hmr-loader": "3.0.2",
    "@ngrx/core": "1.2.0",
    "@ngrx/effects": "2.0.2",
    "@ngrx/router-store": "1.2.5",
    "@ngrx/store": "2.2.1",
    "core-js": "2.4.1",
    "reselect": "2.5.4",
    "rxjs": "5.3.0",
    "zone.js": "0.8.5"
  },

I'm using ngrx with ngrx-effect as detailed in this repo:

https://github.com/ngrx/example-app

Thanks for the help

alastair-todd commented 7 years ago

@pjpenast do you have @ngrx/store-devtools in your devDependencies?

see #55

pjpenast commented 7 years ago

Yes. Fixed updating version of @ngrx/store-devtools

Thanks!