-
SummaryReact v18.2.0 While trying to deploy, I kept receiving an error message: The only way I could resolve it was by adding types property to children like so: But this isn't what's in the documentation to do. Can anyone help me understand why this happened? I manually added Next.js to an existing project if that detail helps any. Additional informationType error: Type '{ children: ReactNode; }' does not satisfy the constraint 'LayoutProps'.
Property 'types' is missing in type '{ children: ReactNode; }' but required in type 'LayoutProps'. ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Do you have a parallel route called Perhaps something like this: ![]() That'll trigger this, expected, error: src/app/layout.tsx
Type error: Type '{ children: ReactNode; }' does not satisfy the constraint 'LayoutProps'.
Property 'types' is missing in type '{ children: ReactNode; }' but required in type 'LayoutProps'. And that's because of how Parallel Routes work: https://nextjs.org/docs/app/building-your-application/routing/parallel-routes |
Beta Was this translation helpful? Give feedback.
-
Nide sure you don't accidently have children: React.ReactDOM, instead of children: React.ReactNode |
Beta Was this translation helpful? Give feedback.
Do you have a parallel route called
@types
underapp
?Perhaps something like this:
That'll trigger this, expected, error:
And that's because of how Parallel Routes work: https://nextjs.org/docs/app/building-your-application/routing/parallel-routes