tbakerx/react-resume-template

Something is broken

davidgs opened this issue · 3 comments

I forked this template (which looks very cool!), ran yarn install and then yarn dev as instructed and ...

src/pages/_app.tsx:10:8 - 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/davidgs/github.com/node_modules/@types/react/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'.

10       <Component {...pageProps} />
          ~~~~~~~~~

  ../node_modules/@types/react/index.d.ts:181:9
    181         children: ReactNode;
                ~~~~~~~~
    'children' is declared here.

src/pages/index.tsx:20:6 - error TS2786: 'Page' cannot be used as a JSX component.
  Its element type 'ReactElement<any, any> | Component<PropsWithChildren<HomepageMeta>, any, any> | null' is not a valid JSX element.
    Type 'Component<PropsWithChildren<HomepageMeta>, any, any>' is not assignable to type 'Element | ElementClass | null'.
      Type 'Component<PropsWithChildren<HomepageMeta>, 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/davidgs/github.com/node_modules/@types/react/index").ReactNode'.

20     <Page description={description} title={title}>
        ~~~~

src/pages/index.tsx:21:8 - error TS2786: 'Header' cannot be used as a JSX component.
  Its element type 'ReactElement<any, any> | Component<{}, any, any> | null' is not a valid JSX element.
    Type 'Component<{}, any, any>' is not assignable to type 'Element | ElementClass | null'.
      Type 'Component<{}, 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/davidgs/github.com/node_modules/@types/react/index").ReactNode'.

21       <Header />
          ~~~~~~


Found 3 errors.

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I'm going to dig in and see if I can figure out what the problem is, and if I do, I'll submit a PR. Just thought you should know.

I'm unable to reproduce this on my end, have you had any luck? I'm pushing some dependency updates right away, do you want to have a look after pulling those changes and see if it fixes the issue for you?

Seems to work now! Thanks!

thanks!!!