Type error: Type 'Readonly<{ children: ReactNode; }>' does not satisfy the constraint 'LayoutProps'. #77957
Unanswered
yashaswi1004
asked this question in
Help
Replies: 1 comment 10 replies
-
Did you also update @types/react? possibly react-dom types too? |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
trying to upgrade from next v14 to latest version and found this problem when trying to build my nextjs application
app/layout.tsx
Type error: Type 'Readonly<{ children: ReactNode; }>' does not satisfy the constraint 'LayoutProps'.
Types of property 'children' are incompatible.
Type 'ReactElement<unknown, string | JSXElementConstructor>' is not assignable to type 'ReactNode'.
Property 'children' is missing in type 'ReactElement<unknown, string | JSXElementConstructor>' but required in type 'ReactPortal'.
how to solve it?
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions