crubier / react-graph-vis

A react component to render nice graphs using vis.js

Home Page:http://crubier.github.io/react-graph-vis/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider upgrading vis dependencies to latest version

SakurAni opened this issue · comments

The react-network dependency in this project is currently around one year old and they mad a lot of improvements and released a lot of versions during the last year. We actually need at least one functionality from a later version, and tried updating the react-network dependency manually, but this seems to result in some errors due to incompatibility with react-graph-vis. Can you consider updating your dependencies to the latest version of vis-network (and vis-data, which seems to be needed), to keep this component working, please? Thank you!

Funnily enough, we also had the same idea the past couple weeks. Looks like the changes aren't too intrusive to get working. Like you mentioned, the latest version now depends on a vis-data sub-dependency, with some slight import modifications.

Here's the PR

Hey, I tried to implement your Pull Request (thanks for the hint!), but it is now telling me, that he cannot find vis-network and vis-data in the lib folder. Do you have any idea how I can fix this? Thanks :)

I'm not too sure on what method you used to implement this for yourself, but it sounds like your product's node_modules is still bringing in the old v5.1.1 vis-network sub-dependency. You should be able to get around this by manually adding the following lines to your package.json and to re-run npm install to force the most recent core vis packages into your node_modules. Then you can try using the PR version of the wrapper again. This should get you going until/if this PR gets merged!

"vis-data": "^7.1.2",
"vis-network": "^9.0.0",

I tried this, and even installed the network and data dependencies in my main project, where I need react-vis-graph as a dependency, but i still get the message
Module not found: Error: Can't resolve 'vis-network' in 'C:\dev\repos\CORE-NG.CLIENT.WEB\react\node_modules\react-graph-vis\lib' (and the same for vis-data)
at this point, I'm kind of at the end of my knowledge unfortunaley, but anyway, thank you very much for the help so far, guess I just hope you PR gets merged soon.

is this project dead or will there be any updates? thanks!

I can accept pull requests but I won't fix problems myself for now as I don't have time for it. The codebase is pretty small and easy to grasp, feel free to contribute!

Thank you for the answer! There already is a pull request from @EdAllonby which adresses this issue, you may just accept his PR to fix this? :-)

See here: #102

Ok done 👍

But it does not work, on the latest version I am unable to run the example. So I didnt publish for now.

Thanks! @crubier I've created a PR to fix the example - I noticed the example's react version is really far behind. I'm not entirely sure what the root cause of this is, but upgrading to the latest fixes the example. #104

Just to let you know, I've tried out the new 1.0.6 version of this package on a substantial project and it looks like it's working on first glance.

Ok thank you! Merged your work, works perfectly!