Open
Description
- I downloaded this repo
cd reactflow-nextjs-app-router
yarn install
- 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.
Metadata
Metadata
Assignees
Labels
No labels