react-digraph icon indicating copy to clipboard operation
react-digraph copied to clipboard

react-digraph has a transitive dependancy to react15

Open mjothy opened this issue 3 years ago • 2 comments

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 avatar Feb 04 '22 11:02 mjothy

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 ?

mjothy avatar Feb 04 '22 11:02 mjothy

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

AmitAber avatar Dec 28 '22 10:12 AmitAber