danielcaldas / react-d3-graph

Interactive and configurable graphs with react and d3 effortlessly
https://danielcaldas.github.io/react-d3-graph/sandbox/
MIT License
819 stars 233 forks source link

Compatibility issue react d3 tree 2.6.0 with react 17.0.1 #526

Closed Pavan-Chavan closed 2 years ago

Pavan-Chavan commented 2 years ago

I'm trying to us react d3 tree 2.6.0 in my project with react version of 17.0.1

when I hit command npm install react-d3-graph

it gives me following error

PS C:\pathofproject> npm install react-d3-graph
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: @pathofsnapshot@1.24.0-SNAPSHOT.4
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.4.1" from react-d3-graph@2.6.0
npm ERR! node_modules/react-d3-graph
npm ERR!   react-d3-graph@"^2.6.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 

as per error I found that this is compatibility error. Would you like give me any suggestion for this,

How I can resolve this error without changing react version ?

Thanks you ! if you come till here.

shahriarhossain commented 1 year ago

@Pavan-Chavan : Did you able to solve it without changing the react version?