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

peer dependency conflict with react #223

Closed
vveewwee opened this issue Aug 17, 2022 · 4 comments
Closed

peer dependency conflict with react #223

vveewwee opened this issue Aug 17, 2022 · 4 comments

Comments

@vveewwee
Copy link

Hello there, i have a dependency conflict when installing better-docs locally on a react app, which i forced to install nevertheless, and then i modifed the react peer dependency by adding " ||^18" but the error msg stil appears (makes sense). I would prefere not to downgrade to a lower react version to solve the problem. Any other ideas ?
Would just running it with --legacy-peer-deps be the best solution ?
Thank you !
Error msg:

Found: react@18.2.0 node_modules/react react@"^18.2.0" from the root project Could not resolve dependency: peer react@"^17.0.2" from better-docs@2.7.2 node_modules/better-docs better-docs@"^2.7.2" from the root project

package-lock.json:

"node_modules/better-docs": { ... }, "peerDependencies": { "react": "^17.0.2 || ^18", "react-dom": "^17.0.2 || ^18" }

@LagoonProject
Copy link

I have the same problem when running npm install --save-dev better-docs. How did you solved it?

npm ERR! While resolving: my-app@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@"^17.0.2" from better-docs@2.7.2
npm ERR! node_modules/better-docs
npm ERR!   dev better-docs@"*" from the root project

@vveewwee
Copy link
Author

vveewwee commented Sep 3, 2022

I didnt, i kept having errors everytime i typed npm commands even though i run it with --legacy-peers-deps, nobody answered so i just removed it and then closed the issue.. Sorry, if you want me i can reopen it!

@LagoonProject
Copy link

I didnt, i kept having errors everytime i typed npm commands even though i run it with --legacy-peers-deps, nobody answered so i just removed it and then closed the issue.. Sorry, if you want me i can reopen it!

thanks for your answer, I checked and it works with react v17.0.2 but not v18.0.2. I guess there's nothing to do, we'll have to wait until they update it.

@vveewwee
Copy link
Author

vveewwee commented Sep 3, 2022

Yes, thats what the error message says, and even if you change the package-lock.json file, as posted on my first comment, it still doesnt work ! So i guess you are right, we have to wait.. ^^

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

2 participants