ngrx import in angular application

Viewed 4133

I am trying to import NGRX to build a new Angular application but i have this error in my terminale when i use ng serve:

ERROR in node_modules/@ngrx/store/src/reducer_creator.d.ts:32:99 - error TS1005: ',' expected.

32 export declare function on<State, Creators extends readonly ActionCreator[]>(...args: [...creators: Creators, reducer: OnReducer<State, Creators>]): ReducerTypes<State, Creators>; ~ node_modules/@ngrx/store/src/reducer_creator.d.ts:32:118 - error TS1005: ',' expected.

32 export declare function on<State, Creators extends readonly ActionCreator[]>(...args: [...creators: Creators, reducer: OnReducer<State, Creators>]): ReducerTypes<State, Creators>;

This Is my angular cli / node version / OS Angular CLI: 9.1.0 Node: 10.13.0 OS: darwin x64

2 Answers

Downgrade the @ngrx/store to 10.2.1 or lower version.

cmd: yarn add @ngrx/store@10.2.1

If you are using npm then

cmd: npm install @ngrx/store@10.2.1

Related