react-json-view icon indicating copy to clipboard operation
react-json-view copied to clipboard

react 18 peer dependencies error

Open alenocera opened this issue 2 years ago • 14 comments

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!

alenocera avatar May 02 '22 15:05 alenocera

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

kolban-google avatar May 30 '22 03:05 kolban-google

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.

alenocera avatar May 30 '22 07:05 alenocera

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

baartch avatar Jun 01 '22 09:06 baartch

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

alenocera avatar Jun 01 '22 10:06 alenocera

Bumping here

rememberlenny avatar Jun 13 '22 07:06 rememberlenny

npm ERR! Could not resolve dependency: npm ERR! peer react@"^17.0.0 || ^16.3.0 || ^15.5.4" from [email protected]

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

ekinsogut avatar Jun 15 '22 07:06 ekinsogut

npm ERR! Could not resolve dependency: npm ERR! peer react@"^17.0.0 || ^16.3.0 || ^15.5.4" from [email protected]

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 :)

alenocera avatar Jun 15 '22 07:06 alenocera

Thanks for your support 👍 @alenocera

ekinsogut avatar Jun 15 '22 07:06 ekinsogut

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

damikun avatar Jun 23 '22 08:06 damikun

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?

baartch avatar Jun 28 '22 05:06 baartch

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: [email protected]
npm WARN Found: [email protected]
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 [email protected]
npm WARN node_modules/@microlink/react-json-view/node_modules/flux
npm WARN   flux@"~4.0.1" from @microlink/[email protected]
npm WARN   node_modules/@microlink/react-json-view
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^15.0.2 || ^16.0.0 || ^17.0.0" from [email protected]
npm WARN   node_modules/@microlink/react-json-view/node_modules/flux
npm WARN     flux@"~4.0.1" from @microlink/[email protected]
npm WARN     node_modules/@microlink/react-json-view

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

grahamb avatar Jun 29 '22 23:06 grahamb

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

himself65 avatar Aug 31 '22 03:08 himself65

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

image

YYsuni avatar Apr 27 '23 03:04 YYsuni

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: https://github.com/facebook/docusaurus/pull/9116

slorber avatar Jun 30 '23 16:06 slorber