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-digraph has a transitive dependancy to react15 #335

Open
mjothy opened this issue Feb 4, 2022 · 2 comments
Open

react-digraph has a transitive dependancy to react15 #335

mjothy opened this issue Feb 4, 2022 · 2 comments

Comments

@mjothy
Copy link

mjothy commented Feb 4, 2022

Hello, I have an issue while running npm install in my project, my react-digraph dependency (to v7.2.1) is pulling react 15 due to a transitive dependency :

react-digraph [7.2.1] > html-react-parser [0.6.1] > react-dom-core [0.0.3] > react [15]

The first two have a proper peerDependency to react, but the last has react 15 as dependency instead.

My app is running on react 16.14 (same as v7.2.1 of react-digraph), but is now pulling both versions of react after npm install, breaking the runtime.

Is there any workaround ? It seems to me this issue should be affecting anyone who tries to use v7.2.1 ?

Thank you for your time.

@mjothy
Copy link
Author

mjothy commented Feb 4, 2022

I'll add that it seems html-react-parser v0.9.0 does not have react-dom-core as a dependency anymore, so this might be a fix for v7.2.1 to upgrade to this version ?

@AmitAber
Copy link

The issue can be mitigated by upgrading html-react-paser, e.g. to "^3.0.0". This can be forced from outside using resolution overrides (yarn/npm).

This can cause a new issue for React 18+ apps since the code uses the now deprecated ReactDOM.render API in several places (e.g. https://github.com/uber/react-digraph/blob/master/src/components/graph-view.js#L1588).

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