I'm moving to Angular v19 and I'm struggling with setup initialisation of NGRX/store

Discussão em 'Angular' iniciado por paker981, Fevereiro 18, 2025.

  1. paker981

    paker981 Guest

    enter image description here

    denormalized-user.selectors.ts:22 Uncaught TypeError: Cannot read properties of undefined (reading 'SelectEntities') After upgrading my application from Angular v18 to v19. I'm getting error at initlization app. Application is struggling to initialise selectors. Has anyone had a similar problem? just to add that I have checked the transition from the StoreModule.forRoot({ -> provideStore({}) approach - without success

    My app.module.ts

    @NgModule({ declarations: [AppComponent],
    bootstrap: [AppComponent], imports: [
    BrowserModule,
    BrowserAnimationsModule,
    TranslationModule,
    InterceptorsModule,
    RouterModule.forRoot(APP_ROUTES, {
    paramsInheritanceStrategy: "always",
    useHash: true,
    }),
    AppStoreModule,
    FormsModule,
    ReactiveFormsModule,
    NgSelectModule,
    HighlightedOccurrenceFormModule,
    QuillModule.forRoot(),
    ToastModule], providers: [{ provide: NgbTooltipConfig, useFactory: tooltipConfigFactory }, provideHttpClient(withInterceptorsFromDi(), withXsrfConfiguration({}))] })
    export class AppModule {}


    My app-store-module.ts

    @NgModule({
    imports: [
    StoreModule.forRoot({
    [ROUTER_STORE_KEY]: routerReducer,
    }),
    StoreRouterConnectingModule.forRoot({
    stateKey: ROUTER_STORE_KEY,
    }),
    CustomRouterStoreModule,
    EffectsModule.forRoot([]),
    LoginStoreModule,
    ...
    ],
    })
    export class AppStoreModule {}



    I tried to move it step by step in approach to update - without diff, always end up not initialising properly, and I get errors related to initialisation.

    Continue reading...

Compartilhe esta Página