Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

Template dependencies cannot be resolved #51

Closed
rondobohrens opened this issue Mar 31, 2022 · 4 comments
Closed

Template dependencies cannot be resolved #51

rondobohrens opened this issue Mar 31, 2022 · 4 comments

Comments

@rondobohrens
Copy link

rondobohrens commented Mar 31, 2022

Hey everyone,

just tried to setup a new react redux project with create-react-app and the redux template.
When installing dependencies, I receive the following errors in resolving the dep. tree:

Installing template dependencies using npm...
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: MYAPP@0.1.0
npm ERR! Found: react@18.0.0
npm ERR! node_modules/react
npm ERR!   react@"^18.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.3 || ^17" from react-redux@7.2.6
npm ERR! node_modules/react-redux
npm ERR!   react-redux@"^7.2.3" 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 MY FILE PATH for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     MY PATH/log
`npm install --no-audit --save @reduxjs/toolkit@^1.5.1 @testing-library/jest-dom@^4.2.4 @testing-library/react@^9.3.2 @testing-library/user-event@^7.1.2 react-redux@^7.2.3` failed

Also found this problem mentioned here.

EDIT: npm install --no-audit --save --force @reduxjs/toolkit@^1.5.1 @testing-library/jest-dom@^4.2.4 @testing-library/react@^9.3.2 @testing-library/user-event@^7.1.2 react-redux@^7.2.3 at least lets me compile the build succesfully -- but is there a better option?

Any advice on how to resolve or troubleshoot this?
Thanks in advance!

@cvelascoiv
Copy link

The problem is the peer dependency of @React-Redux which is react 17. As of now there is no other solution but to downgrade first your react to 17, then install react-redux. for react-redux --> says it will take weeks for the solution (link.

@phryneas
Copy link
Member

Or to use the react-redux 8 beta, for which we really want some feedback for quite some time now.

@phryneas
Copy link
Member

Should generally be working now: https://twitter.com/acemarke/status/1509540340088328196

@markerikson
Copy link
Contributor

Unfortunately the issue occurs before you have a chance to choose the React-Redux version, and that's part of the template setup anyway.

But yes, hopefully this should be resolved now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants