vasturiano / react-force-graph

React component for 2D, 3D, VR and AR force directed graphs
https://vasturiano.github.io/react-force-graph/example/large-graph/
MIT License
2.11k stars 269 forks source link

Problem integrating react-force-graph-2d in a react with TypeScript project #493

Open Franbr31 opened 6 months ago

Franbr31 commented 6 months ago

Hi!!, We are trying to use the react-force-graph-2d library in our project, but when compiling the app we have the following problem:

./node_modules/force-graph/dist/force-graph.mjs 
Can't import the named export 'Easing' from non EcmaScript module (only default export is available).

We use node: v14.21.3, react: v16.13.1 and typescript: v4.9.5, could this be due to a compatibility issue?

Thank you very much in advance! :)

vasturiano commented 6 months ago

@Franbr31 looks like you're running into an issue importing TweenJs. Can you tell which version of tweenJs do you have in your app's dependency tree?

AitorMelero commented 1 month ago

Hi! I have the same issue, is there anything new? I have 23.1.2 version of tweenJs.

Thank you very much!