Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors in unchanged example source code -- reactflow-nextjs #6

Open
chris-braidwell opened this issue May 20, 2024 · 0 comments
Open

Comments

@chris-braidwell
Copy link

chris-braidwell commented May 20, 2024

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

Error 1

❯ npx tsc

src/pages/_app.tsx:7:11 - error TS2786: 'Component' cannot be used as a JSX component.
  Its element type 'ReactElement<any, any> | Component<any, any, any> | null' is not a valid JSX element.
    Type 'Component<any, any, any>' is not assignable to type 'Element | ElementClass | null'.
      Type 'Component<any, any, any>' is not assignable to type 'ElementClass'.
        The types returned by 'render()' are incompatible between these types.
          Type 'React.ReactNode' is not assignable to type 'import("/Users/chris/projects/2-react-flow-example-apps/reactflow-nextjs/node_modules/@types/react-dom/node_modules/@types/react/ts5.0/index").ReactNode'.
            Type 'ReactElement<any, string | JSXElementConstructor<any>>' is not assignable to type 'ReactNode'.
              Property 'children' is missing in type 'ReactElement<any, string | JSXElementConstructor<any>>' but required in type 'ReactPortal'.

7   return <Component {...pageProps} />;
            ~~~~~~~~~

  node_modules/@types/react-dom/node_modules/@types/react/ts5.0/index.d.ts:378:9
    378         children: ReactNode;
                ~~~~~~~~
    'children' is declared here.

Found 1 error in src/pages/_app.tsx:7

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 #5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant