When creating a new project using blitz new it fails to build.
Paste all your error logs here:
╰─$ blitz new test-blitz
✔ You have the latest Blitz version
✔ Pick a new project's language · TypeScript
✔ Pick your new app template · full
✔ Install dependencies? · yarn
✔ Pick a form library (you can switch to something else later if you want) · React Hook Form
....
<trimmed>
....
╰─$ cd test-blitz
╰─$ blitz build
Loaded env from test-blitz/.env.local
Loaded env from test-blitz/.env
info - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
info - Generating route manifest
Failed to compile.
./app/auth/pages/forgot-password.tsx:46:43
Type error: 'Layout' cannot be used as a JSX component.
Its element type 'ReactElement<any, any> | Component<{ title?: string | undefined; }, any, any> | null' is not a valid JSX element.
Type 'Component<{ title?: string | undefined; }, any, any>' is not assignable to type 'Element | ElementClass | null'.
Type 'Component<{ title?: string | undefined; }, 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("/media/DataSSD/Projekte/misc/test-blitz/node_modules/@testing-library/react-hooks/node_modules/@types/react/index").ReactNode'.
Type '{}' is not assignable to type 'ReactNode'.
Type '{}' is missing the following properties from type 'ReactPortal': key, children, type, props
44 |
45 | ForgotPasswordPage.redirectAuthenticatedTo = "/"
> 46 | ForgotPasswordPage.getLayout = (page) => <Layout title="Forgot Your Password?">{page}</Layout>
| ^
47 |
48 | export default ForgotPasswordPage
49 |
What is the problem?
When creating a new project using
blitz new
it fails to build.Paste all your error logs here:
Paste all relevant code snippets here:
-
What are detailed steps to reproduce this?
blitz new <name>
blitz build
Run
blitz -v
and paste the output here:Please include below any other applicable logs and screenshots that show your problem:
Why is blitz using alpha/beta versions of react/react-dom 18?![image](https://user-images.githubusercontent.com/4238281/162630022-43ad1adc-1569-4ec6-87c0-03cf5f8e5294.png)