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
NgRx v11 expects TypeScript 4 to be used and Angular 11. https://ngrx.io/guide/migration/v11
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.