networkD3 icon indicating copy to clipboard operation
networkD3 copied to clipboard

avoid dependency version conflicts with other htmlwidgets

Open cjyetman opened this issue 8 years ago • 3 comments

There has been some discussion about this here #143

In short, if two htmlwidgets are being displayed on the same page and they use the same Javascript dependency but different versions, those dependencies can overwrite each other when they are loaded/added to window. Additionally, if they have the same name in their YAML file, htmlwidgets will only load the one with the highest version number. I point this out separately because even if htmlwidgets did load both versions, there could still be a collision when they were loaded onto window. This is most notably an issue with incompatibilities between D3v3 and D3v4.

It would be great to collect all discussion, ideas, links, hints, etc. about this problem in one issue here. @timelyportfolio, you seem to have been following this problem for a while, so it would be nice if you could copy in here those ideas and links to similar solutions or discussions in other packages.

cjyetman avatar Jan 12 '17 10:01 cjyetman

Hi, I see comments about this issue from 5 years ago. I am having the same problem still in 2022. Has this being fixed?

IsabelFE avatar Aug 05 '22 17:08 IsabelFE

I don't think a solution was ever found, it's just a known problem.

I started building a new package with similar functionality but based on {r2d3} which circumvents this problem, but it is not complete. https://cjyetman.com/network.r2d3/

cjyetman avatar Aug 05 '22 17:08 cjyetman