Issues with versions of @types/react in my extension - help wanted

Hi!

I currently try to program an extension for JupyterLab which worked fine after getting going with the basics. But now I hit a roadblock I am stuck on:

Consider the following:

  • I use the possibility for React with ReactWidget which works fine
  • I need to include a Parallel Plot in the Widget, whereas I would like to use Plotly

Issue:

  • So it seems that no matter what I try in terms of versions of react-plotly.js / @types/react-plotly.js I always come up with different versions of @types/react (one 18 & one 17). It seems that @jupyterlab/apputils uses 17 and current plotly-stuff uses 18.

I am really a bit stuck here and would be very glad for any idea, tip or workaround to sort this out. I guess the issue will prevail for any current react-related packages. This might be related https://github.com/facebook/react/issues/24304

As always, appreciate any help :slight_smile:
Best Regards
Martin

Adding this block to package.json solves it:

“resolutions”: {
“**/@types/react”: “^17.0.0”
}

I dont know why I need to write a forum post to solve things. :smiley:

1 Like