Skip to content

Problems with ngrx: Value could not be determined statically  #133

@bppn

Description

@bppn

Using Angular 16 when generating a domain + app and enabling ngrx, the following code is generate (domain account):

import { NgModule, isDevMode } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { AccountWelcomeComponent } from './nx-welcome.component';
import { StoreModule } from '@ngrx/store';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import { EffectsModule } from '@ngrx/effects';
import { AccountFeatureAvatarModule } from '@portal/account/feature-avatar';
import { HttpClientModule } from '@angular/common/http';

@NgModule({
  declarations: [AppComponent, AccountWelcomeComponent],
  imports: [
    BrowserModule,
    StoreModule.forRoot({}),
    isDevMode() ? StoreDevtoolsModule.instrument() : [],
    EffectsModule.forRoot(),
    AccountFeatureAvatarModule,
    HttpClientModule,
  ],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}

However the following error is reported and the line sDevMode() ? StoreDevtoolsModule.instrument() : [],

Value at position 2 in the NgModule.imports of AppModule is not a reference
Value could not be determined statically.(-991010)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions