xyflow: Can't reexport the named export 'ReactFlow' from non EcmaScript module (only default export is available)
Describe the Bug
The below issue arises because we are first exporting everything from export * from '@reactflow/core';
once and then export { ReactFlow as default } from '@reactflow/core';
in the very next line making ReactFlow
to be imported twice and exported twice.
./node_modules/reactflow/dist/esm/index.mjs
Can't reexport the named export 'ReactFlow' from non EcmaScript module (only default export is available)
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
- Install
reactflow
. - Import it in any package.
- Make it executable either by attaching the component/screen using
ReactFlow
fromreactflow
with a route or by using inside any other component that comes in the execution/usage flow. - You should see the following error in console/terminal on running the application. Image:
Expected behavior
The expected behaviour is that reactflow package install and usage should not raise errors.
Screenshots or Videos
Platform
- OS: Windows
- Browser: Chrome
- Version: 115.0.5790.171 (Official Build) (64-bit)
Additional context
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (5 by maintainers)
same problem with me, and I have resolved it with your case, thx
I am able to make it compile with
However ReactFlow seems to work in read-only mode. Nodes & edges show up but can not interact (zoom, move, connect…) them
(edited: sorry, ReactFlow works well, the non-interact error is from my own project code)
Its a react project with react v17.0.1, webpack v4.x
Vite dev server works fine