so I've update @ngrx
to its latest releases this morning:
- "@ngrx/effects": "10.1.2",
- "@ngrx/router-store": "10.1.2",
- "@ngrx/store": "10.1.2",
+ "@ngrx/effects": "11.0.0",
+ "@ngrx/router-store": "11.0.0",
+ "@ngrx/store": "11.0.0",
@angular/core
has already been migrated to @^11.0.0
before, everything worked well with @ngrx/store@10.1.2
. despite the invalid peerDependency
, of course.
now my build (ng build [PROJECT_NAME]
) got stuck throwing errors:
An unhandled exception occurred: @ngrx/store/ngrx-store.ts(224,21): Error during template compile of 'StoreModule'
Expression form not supported.
@ngrx/store/ngrx-store.ts(231,15): Error during template compile of 'StoreModule'
Expression form not supported.
@ngrx/store/ngrx-store.ts(257,13): Error during template compile of 'StoreModule'
Expression form not supported.
@ngrx/store/ngrx-store.ts(224,21): Error during template compile of 'StoreModule'
Expression form not supported.
@ngrx/store/ngrx-store.ts(231,15): Error during template compile of 'StoreModule'
Expression form not supported.
@ngrx/store/ngrx-store.ts(257,13): Error during template compile of 'StoreModule'
Expression form not supported.
I've already figured out, that the cause is somehow related to StoreModule.forFeature('auth', reducers)
which I import in a submodule. the root AppModule
imports StoreModule.forRoot(reducers, { metaReducers }),
. I cannot really find an error, feature reducers combined as following:
export interface AuthStateData {
status: fromAuth.AuthStateData;
loginPage: fromLoginPage.LoginStateData;
}
export const reducers: ActionReducerMap<AuthStateData> = {
status: fromAuth.reducer,
loginPage: fromLoginPage.reducer
};
has anyone experienced similar issues? and in the best case found a solution?
no, (sadly) my code is not open sourced.
so, it was a bug after all :)
report: https://github.com/ngrx/platform/issues/2919
fix: https://github.com/ngrx/platform/pull/2922