ngrx / core

Core functionality for the ngrx platform
MIT License
72 stars 25 forks source link

"cannot convert udefined or null to object" on initialisation with angular 4.0.0-rc.5 #14

Closed victornoel closed 7 years ago

victornoel commented 7 years ago

Hi,

I feel the source of this problem is in ngrx but I'm not 100% sure, at least it manifests itself with it…

Basically, since I updated my application from angular 4.0.0-rc.3 to 4.0.0-rc.5 (see https://gitlab.com/linagora/petals-cockpit/commit/d7caeefe44262442e33dd024682282037ba02982 for the exact changes), I can run ng serve and then when I open the application with Chromium, I get the following error in the console:

polyfills.bundle.js:2717 Unhandled Promise rejection: Cannot convert undefined or null to object ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at combineReducers (vendor.bundle.js:55798)
    at _initialReducerFactory (vendor.bundle.js:99193)
    at AppModuleInjector.get (ng:///AppModule/module.ngfactory.js:146)
    at AppModuleInjector.getInternal (ng:///AppModule/module.ngfactory.js:655)
    at AppModuleInjector.NgModuleInjector.get (vendor.bundle.js:3542)
    at _createReducerIfExtension (vendor.bundle.js:98799)
    at AppModuleInjector.createInternal (ng:///AppModule/module.ngfactory.js:315)
    at AppModuleInjector.NgModuleInjector.create (vendor.bundle.js:3523)
    at NgModuleFactory.create (vendor.bundle.js:3496)
    at vendor.bundle.js:4692
    at ZoneDelegate.webpackJsonp.632.ZoneDelegate.invoke (polyfills.bundle.js:2513)
    at Object.onInvoke (vendor.bundle.js:4083)
    at ZoneDelegate.webpackJsonp.632.ZoneDelegate.invoke (polyfills.bundle.js:2512)
    at Zone.webpackJsonp.632.Zone.run (polyfills.bundle.js:2273) TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at combineReducers (http://localhost:4200/vendor.bundle.js:55798:30)
    at _initialReducerFactory (http://localhost:4200/vendor.bundle.js:99193:98)
    at AppModuleInjector.get (ng:///AppModule/module.ngfactory.js:146:107)
    at AppModuleInjector.getInternal (ng:///AppModule/module.ngfactory.js:655:71)
    at AppModuleInjector.NgModuleInjector.get (http://localhost:4200/vendor.bundle.js:3542:44)
    at _createReducerIfExtension (http://localhost:4200/vendor.bundle.js:98799:32)
    at AppModuleInjector.createInternal (ng:///AppModule/module.ngfactory.js:315:22)
    at AppModuleInjector.NgModuleInjector.create (http://localhost:4200/vendor.bundle.js:3523:76)
    at NgModuleFactory.create (http://localhost:4200/vendor.bundle.js:3496:18)
    at http://localhost:4200/vendor.bundle.js:4692:61
    at ZoneDelegate.webpackJsonp.632.ZoneDelegate.invoke (http://localhost:4200/polyfills.bundle.js:2513:26)
    at Object.onInvoke (http://localhost:4200/vendor.bundle.js:4083:37)
    at ZoneDelegate.webpackJsonp.632.ZoneDelegate.invoke (http://localhost:4200/polyfills.bundle.js:2512:32)
    at Zone.webpackJsonp.632.Zone.run (http://localhost:4200/polyfills.bundle.js:2273:43)
victornoel commented 7 years ago

Sorry, it should have been in ngrx/store, and it is actually already issued there: ngrx/store#357