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

react 18 peer dependencies error #403

Open
alenocera opened this issue May 2, 2022 · 14 comments
Open

react 18 peer dependencies error #403

alenocera opened this issue May 2, 2022 · 14 comments

Comments

@alenocera
Copy link

Hi guys,
with the new react v18 the dependencies cause an error when npm -i is executed.
Can you please provide the fix to the dependencies error on installation?
Thank you very much!

ubmarco added a commit to open-needs/open-needs-webapp that referenced this issue May 16, 2022
react-json-view is not yet available for React 18.
See mac-s-g/react-json-view#403
@kolban-google
Copy link

Is this project still being managed? It seems like it has been over 15 months from this posting that there was last a commit.

@alenocera
Copy link
Author

I hope the dev upgrade it because this project is useful (at least in my activities) and it will be bad if this project become "not maintained". We will see what happens.

@baartch
Copy link

baartch commented Jun 1, 2022

The fix is already there (#402)... but @mac-s-g does not seem to be able or willing to continue the work on this repo

@alenocera
Copy link
Author

Sin! It's a nice project...but to continue with the fix as you mentioned it's kinda only the merge...so quite easy I guess...hoping that will be done, just to have React 18 project upgraded

@rememberlenny
Copy link

Bumping here

@ekinsogut
Copy link

npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.0 || ^16.3.0 || ^15.5.4" from react-json-view@1.21.3

I'm getting this error in a React (v18) project. Is there a way to get this dependency resolved?

@alenocera
Copy link
Author

npm ERR! Could not resolve dependency: npm ERR! peer react@"^17.0.0 || ^16.3.0 || ^15.5.4" from react-json-view@1.21.3

I'm getting this error in a React (v18) project. Is there a way to get this dependency resolved?

yes, a temporary solution is to install your packages with
--legacy-peer-deps

but if we have the "fix" with the React 18 support, it will be much better :)

@ekinsogut
Copy link

Thanks for your support 👍 @alenocera

@damikun
Copy link

damikun commented Jun 23, 2022

I dont recomend to use --legacy-peer-deps this can mishmash your package versions...

@baartch
Copy link

baartch commented Jun 28, 2022

as mac-s-g does not seem to maintain this package anymore, I use:
https://www.npmjs.com/package/@microlink/react-json-view

We as the community may should agree to go on with a fork that is maintained?

@grahamb
Copy link

grahamb commented Jun 29, 2022

Both this and the @microlink/react-json-view fork depend on flux, which is unmaintained and results in npm install warnings:

❯ npm i                                  
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: flux@4.0.3
npm WARN Found: react@18.2.0
npm WARN node_modules/react
npm WARN   react@"^18.2.0" from the root project
npm WARN   23 more (@apollo/client, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^15.0.2 || ^16.0.0 || ^17.0.0" from flux@4.0.3
npm WARN node_modules/@microlink/react-json-view/node_modules/flux
npm WARN   flux@"~4.0.1" from @microlink/react-json-view@1.22.2
npm WARN   node_modules/@microlink/react-json-view
npm WARN 
npm WARN Conflicting peer dependency: react@17.0.2
npm WARN node_modules/react
npm WARN   peer react@"^15.0.2 || ^16.0.0 || ^17.0.0" from flux@4.0.3
npm WARN   node_modules/@microlink/react-json-view/node_modules/flux
npm WARN     flux@"~4.0.1" from @microlink/react-json-view@1.22.2
npm WARN     node_modules/@microlink/react-json-view

cc @Kikobeats as the microlink repo doesn't have issues enabled

@himself65
Copy link

Fixed in https://github.com/TexteaInc/json-viewer

@YYsuni
Copy link

YYsuni commented Apr 27, 2023

Hey, you can give this one a shot: https://github.com/YYsuni/react18-json-view

image

@slorber
Copy link

slorber commented Jun 30, 2023

as mac-s-g does not seem to maintain this package anymore, I use: npmjs.com/package/@microlink/react-json-view

We as the community may should agree to go on with a fork that is maintained?

👍 this fork looks like the best option.

Other mentioned projects look like alternative libs, not immediate replacement forks.

We at Docusaurus are adopting this fork: facebook/docusaurus#9116

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

10 participants