patternfly / react-topology

MIT License
12 stars 19 forks source link

Topology: Error on click of node in backstage instance #44

Closed invincibleJai closed 1 year ago

invincibleJai commented 1 year ago

Describe the problem Getting console error on node click in topology view in the backstage instance, this happens likely as there are different versions of d3 and its dependencies i.e d3-selection library is present with 3.0.0 and pf react-topology has 1.4.2

How do you reproduce the problem?

  1. checkout main https://github.com/janus-idp/backstage-plugins (tried on commit a70889f3304125368e948f15a87f67ae84ab296e)
  2. cd backstage-plugins
  3. rm -rf node_modules (if already have project cloned then remove node_modules)
  4. yarn install
  5. yarn workspace @janus-idp/backstage-plugin-topology run start
  6. select topology from nav and click on any node

error is shown below

Pasted Graphic 1

Expected behavior No error should be shown

Is this issue blocking you? List the workaround if there is one.

Screenshots If applicable, add screenshots to help explain the issue.

What is your environment?

"@patternfly/react-topology": "4.93.4",



**What is your product and what release date are you targeting?** 
Backstage / Janus-IDP, this will impact all the plugins consuming pf react-topology

**Any other information?**
jeff-phillips-18 commented 1 year ago

This is an application issue with pulling in multiple versions of d3-selection. Currently we use D3 version 5 which pulls in d3-selection version 1. You are pulling in d3-selection version 3. These versions are quite different and it will take some time to upgrade PF react-topology to version 3.

jeff-phillips-18 commented 1 year ago

Fixed by #59

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 5.0.0-alpha.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 5.0.0-prerelease.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: