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

fix: provide overrides for react-json-view with react18 version #75

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hokwanhung
Copy link

@hokwanhung hokwanhung commented Dec 24, 2023

Add temporary overrides for react version over 18, with react-json-view dependency (mentioned in #65).

The problem of unsuccessful npm install is because react-json-view has been depreciated for over 3 years, and it does not support react18 (according to Doesn't support React 18? #441).

The two methods are:

  1. Either to change the uses of react-json-view to other packages, namely the recommended ones of @microlink/react-json-view, @YYsuni/react18-json-view or others.

  2. Or to provide overrides (similar effect as --legacy-peer-deps).

This pull request uses the second method, and reduce the users' method of manually force npm install.

If needed, I could also create a sample version of method 1 - swapping react-json-view with other packages.

resolves #65

@hokwanhung
Copy link
Author

hokwanhung commented Dec 24, 2023

This method also applies to Typescript projects over version 5 as react-scripts is also depreciated (mentioned in #51, according to (react-scripts) Support for TypeScript 5.x).

Let me know if this needs to be override as well, or I could try converting it from create-react-app to Next.js or other frameworks.

@hokwanhung
Copy link
Author

Revert unnecessary changes in yarn.lock.

@johnformio
Copy link

This fix worked me.

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

Successfully merging this pull request may close these issues.

Error on Install
2 participants