Please i am currently going through the Mern amazona course and after installing the use-reducer-logger using –force as indicated in the course i am unable to install any other dependency as each time i run npm install it keeps giving me an error that it could not resolve use-reducer-logger and i feel the issue is because use-reducer-logger uses react version 16 and i am currently using react version 18. Please give me your advice on what to do to continue without getting errors
$ npm install react-router-bootstrap
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: use-reducer-logger@1.0.2
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR! peer react@"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0" from @react-aria/ssr@3.3.0
npm ERR! node_modules/@react-aria/ssr
npm ERR! @react-aria/ssr@"^3.2.0" from @restart/ui@1.4.0
npm ERR! node_modules/@restart/ui
npm ERR! @restart/ui@"^1.3.1" from react-bootstrap@2.5.0
npm ERR! node_modules/react-bootstrap
npm ERR! react-bootstrap@"^2.5.0" from the root project
npm ERR! peer react@">=16.8.0" from @restart/hooks@0.4.7
npm ERR! node_modules/@restart/hooks
npm ERR! @restart/hooks@"^0.4.7" from @restart/ui@1.4.0
npm ERR! node_modules/@restart/ui
npm ERR! @restart/ui@"^1.3.1" from react-bootstrap@2.5.0
npm ERR! node_modules/react-bootstrap
npm ERR! react-bootstrap@"^2.5.0" from the root project
npm ERR! @restart/hooks@"^0.4.6" from react-bootstrap@2.5.0
npm ERR! node_modules/react-bootstrap
npm ERR! react-bootstrap@"^2.5.0" from the root project
npm ERR! 12 more (@restart/ui, @testing-library/react, prop-types-extra, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8" from use-reducer-logger@1.0.2
npm ERR! node_modules/use-reducer-logger
npm ERR! use-reducer-logger@"^1.0.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@16.14.0
npm ERR! node_modules/react
npm ERR! peer react@"^16.8" from use-reducer-logger@1.0.2
npm ERR! node_modules/use-reducer-logger
npm ERR! use-reducer-logger@"^1.0.2" 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! See C:\Users\USER\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\USER\AppData\Local\npm-cache\_logs\2022-10-07T08_15_53_560Z-debug-0.log
hello there,
the error is here: npm ERR! peer react@”^16.8″ from use-reducer-logger@1.0.2 use-reducer-logger is deprecated
run
npm uninstall use-reducer-logger
and remove all usage of it in the code to fix the issue.
check this commit for more info:
https://github.com/basir/mern-amazona/commit/ee1b92ac4a25e7d0517395f48ff75cb114839c71