Skip to content

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

@chris-braidwell

Description

@chris-braidwell
  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 #6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions