I am using "react": "^18.2.0"
and trying to initialize combineReducers as below
import { connectRouter } from 'connected-react-router';
const reducer = combineReducers({
language: languageProviderReducer,
router: connectRouter(history),
})
I got this error
Module not found: Error: Can't resolve 'connected-react-router'
then I ran
npm install --save connected-react-router
npm install failed with below details
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: daf-react-ui@0.1.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR! react@"^18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.4.0 || ^17.0.0" from connected-react-router@6.9.3
npm ERR! node_modules/connected-react-router
npm ERR! connected-react-router@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /Users/kkpk/.npm/_logs/2023-03-02T18_30_55_591Z-eresolve-report.txt
is there any workaround for this conflict?