react-app-starterkit icon indicating copy to clipboard operation
react-app-starterkit copied to clipboard

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

Open hokwanhung opened this issue 2 years ago • 3 comments

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 avatar Dec 24 '23 01:12 hokwanhung

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 avatar Dec 24 '23 01:12 hokwanhung

Revert unnecessary changes in yarn.lock.

hokwanhung avatar Dec 30 '23 10:12 hokwanhung

This fix worked me.

johnformio avatar Mar 27 '24 20:03 johnformio