Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump react peer dependency #78

Open
maluramichael opened this issue May 12, 2022 · 8 comments
Open

Bump react peer dependency #78

maluramichael opened this issue May 12, 2022 · 8 comments

Comments

@maluramichael
Copy link

Is it possible to bump the version from react 15.0.0 and 16.0.0 to 17.0.0 and 18.0.0?

Right now i get this error when i try to install the latest version of react-clear-cache.

$ npm install                                                                                                                                                                                              develop * ] 9:05 am
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.0.0 || ^16.0.0" from [email protected]
npm ERR! node_modules/react-clear-cache
npm ERR!   react-clear-cache@"^1.4.12" 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 /Users/michael/.npm/eresolve-report.txt for a full report.```
@gabriel-bishop
Copy link

Encountered this while updating Node version in an old project, I'd also like to see this!

@niltonxp2
Copy link

I'm having the same issue!

@ericowhadi
Copy link

Anybody tried to force the install ?

@niltonxp2
Copy link

Anybody tried to force the install?

Well, for now, I'm using --legacy-peer-deps

@maluramichael
Copy link
Author

Try https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides
Worked wonders for me.

@francowanseele
Copy link

which version did you choose? @maluramichael

@maluramichael
Copy link
Author

@francowanseele

"overrides": {
    "react-clear-cache": {
        "react": ">=15.0.0",
        "react-dom": ">=15.0.0"
    }
},

@francowanseele
Copy link

@maluramichael thank you so much! It worked 🥇 🦾

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

No branches or pull requests

5 participants