An error occurred while compiling the template for 'StoreModule' in the '@ngrx/store' package

I recently updated my @ngrx packages to the latest versions:

-   "@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 had already been upgraded to @^11.0.0 previously and everything was working fine with

@ngrx/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7a090e15081f3a4b4a544b5488">[email protected]</a>
, despite the invalid peerDependency.

However, after the update, my build (ng build [PROJECT_NAME]) started 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.

Upon investigation, I found that the issue seems to be related to

StoreModule.forFeature('auth', reducers)
which is imported in a submodule. The root AppModule imports
StoreModule.forRoot(reducers, { metaReducers }),
. Despite checking the feature reducers setup:

export interface AuthStateData {
  status: fromAuth.AuthStateData;
  loginPage: fromLoginPage.LoginStateData;
}

export const reducers: ActionReducerMap<AuthStateData> = {
  status: fromAuth.reducer,
  loginPage: fromLoginPage.reducer
};

Has anyone faced similar issues before and if so, were you able to find a solution?

Unfortunately, my code is not open source.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The 'Refused to execute inline event handler' error occurs when using Angular

I am encountering a specific error in my Angular application when trying to execute an inline event handler. The error message can be seen below: https://i.stack.imgur.com/jSAIz.png Refused to execute inline event handler because it violates the following ...

What exactly is the purpose of the colon in JavaScript's import statement?

Looking at the following example. import { QueryClientContract, TransactionClientContract } from '@ioc:Adonis/Lucid/Database' I am puzzled by the use of colons and I am unsure about where the imported files are being referenced from. ...

Solutions for resolving the issue of not being able to load images when using merged-images in JavaScript

I have a base64 image here and it has already been converted. data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxQSEhUTEhQWFhUXGBoaGBgYGBcXGhgXGBgYGhgbHhoZHiggGholHhgYITEhJSkrLi4uHR8zODMtNygtLisBCgoKDg0OGhAQGi0lICUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0 ...

Integration of HostConfig with AdaptiveCards

Is there anyone familiar with incorporating a HostConfig to style AdaptiveCards using the webchat CDN in an Asp.Net Core environment? For instance, what should be the name of the file? And where exactly does it need to be placed? The specific setup for ...

Troubleshooting issue: Unable to locate library during testing with Nx, Jest, and Angular

In my nx monorepo, I have two apps (client, server) and 5 libraries (client-core, platform-core, etc). To include the libraries in the Angular client application, I set the paths in the tsconfig.json file. "paths": { "@myorg/platfo ...

Unable to modify the value of a key within an object using TypeScript

I'm struggling to update the value of a key within an object using TypeScript. Here's an overview of the types I'm working with: export enum BAR_TYPES { apple = "apple", banana = "banana" } export type BarTypes = ...

Leverage the power of function overloading in TypeScript for efficient code

How can function overloading be reused effectively in TypeScript? Consider a scenario where a function is overloaded: function apply(value: number): number; function apply(value: string): string; function apply(value: any): any { return value; } No ...

Ensure that only numbers with a maximum of two decimal places are accepted in Angular 2 for input

On my webpage, there are several input boxes where users can enter numbers. I need to prevent them from entering more than two decimal places. Although I tried using the html 5 input Step="0.00", it didn't work as expected. I am open to any TypeScri ...

Refresh the ngrx state data whenever the RouteGuard is triggered

When it comes to ensuring the protected view of an entity, I utilize a RouteGuard to pre-load the necessary data for the desired view into the ngrx store. However, as the corresponding data from the backend can be subject to change over time, it is crucial ...

What is the best way to refresh a Load on Demand feature in Nativescript?

In my RadListView, the data displayed changes depending on the day selected by the user in a calendar. Currently, I am using loadOnDemandMode = "Manual" and it functions smoothly until all the available data is loaded. At that point, I trigger listView.no ...

Ways to retain the Parent component event even after the child component has been rendered

In my project, I have a parent component containing three radio buttons named child-one, child-two, and child-three. When one of these radio buttons is clicked, the respective child component is displayed. Each child component has a radio button with optio ...

execute protractor test without the need for "webdriver-manager start"

Is there a way to execute protractor tests without having to manually type "webdriver-manager start" in the command line? How can I incorporate "webdriver-manager start" into my code when writing in TypeScript? ...

When TypeScript auto-infers my type as `const`, it leads to unexpected errors

Check out this example of TypeScript code: type Interpolation = null | undefined | boolean | number | string; type DefaultTheme = { color: { primary: { active: string; default: string; hover: string; ...

Issue: Loading ES Module in MikroOrm and Typescript requires the use of import statement

My attempt to set up a mikrorm configuration for my postgres DB is hitting a snag when I try to run my run-dev script. The issue stems from an ESM compilation error: > yarn dev Error: Must use import to load ES Module: C:\Users\Itay&b ...

Understanding the distinctions among variables in typescript

Can someone explain the difference in Typescript between "!option" and "option"? It seems like they are not equivalent. const limit = !options.limit || options.limit === NaN ? 0 : options.limit ...

Theme customization in Material UI includes the addition of a custom color. However, this custom color is missing from the control values in Story

Currently in my project, I am utilizing a stack that includes React 18, TypeScript, MUI 5, and Storybook 6.5. I have been attempting to incorporate custom colors into my MUI Theme and have them reflect in Storybook's dropdown options for the color p ...

When the form field is double-clicked, it automatically populates with information, but unfortunately it does not meet the

Presented below is a formgroup configuration: this.order = new FormGroup({ City: new FormControl('', Validators.required), Street: new FormControl('', Validators.required), DateOfDelivery: new FormControl('', Vali ...

A step-by-step guide on updating environment configurations in VSTS Release Management

I am exploring the use of VSTS Release Management to streamline the deployment process for my Web Application across various deployment locations (dev, test, prod). Currently, I rely on different builds to achieve this, but I aim to consolidate everything ...

The HttpHeaders argument cannot be assigned to the headers parameter due to type incompatibility

TS2769: No overload matches this call. The last overload gave the following error. Argument of type 'HttpHeaders' is not assignable to parameter of type '{ headers?: HttpHeaders | { \[header: string\]: string | string\[\] ...

Challenges when transitioning to TypeScript within a React project

I'm in the process of converting my React app Components to Typescript. After installing the TS package and setting up a tsconfig.json file and react-app-env.d.ts files, I made sure to change the file extensions from .js to .tsx. However, I encounter ...