react-flow-example-apps
react-flow-example-apps copied to clipboard
Errors in unchanged example source code -- reactflow-nextjs-app-router
- I downloaded this repo
cd reactflow-nextjs-app-routeryarn install- view code in VS Code:
Error 1
That can be suppressed in VS Code only (not resolved) by preceding with
// eslint-disable-next-line @next/next/no-async-client-component. When I run yarn run build, the build fails for the same issue: Type error: Type '{ children: Element; initialNodes: Node[]; initialEdges: Edge[]; }' is not assignable to type 'IntrinsicAttributes & { children?: ReactNode; }'. Property 'initialNodes' does not exist on type 'IntrinsicAttributes & { children?: ReactNode; }'.
Error 2
I haven't found a fix. This is likely a React 18 types issue. It would be helpful to know how you've solved it, if you have.
Error 3
This can be suppressed (not resolved) by preceding each
size: line with // @ts-ignore TS2322.
Errors 2 and 3 are nuisance -- can be suppressed to reduce IDE noise, although that's not as safe as possible.
However error 1 prevents the app from being built. It can be run via yarn run dev, but yarn run build fails.
May matter -- I'm running Node v21.7.1. Note the repo doesn't specify what Node version to use.
See related https://github.com/xyflow/react-flow-example-apps/issues/6.