react-flow-example-apps icon indicating copy to clipboard operation
react-flow-example-apps copied to clipboard

Errors in unchanged example source code -- reactflow-nextjs-app-router

Open chris-braidwell opened this issue 1 year ago • 0 comments

  1. I downloaded this repo
  2. cd reactflow-nextjs-app-router
  3. yarn install
  4. view code in VS Code:

Error 1 image 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 image 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 image 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.

chris-braidwell avatar May 20 '24 19:05 chris-braidwell