typescript build error
Unanswered
gref9730 posted this in #help-forum
gref9730OP
Hello im not sure if its netjs related or typescript since its my first time building something in typescript... in dev mode (npm run dev) the app works perfectly fine so I wanted to try build it with npm run build and im getting these errors i guess about prop drilling children but in dev mode it works fine so I have no clue what to do 😄
the error looks like this
the error looks like this
.next/types/app/config/users/page.ts:28:13
Type error: Type 'OmitWithTag<{ children: ReactNode; }, keyof PageProps, "default">' does not satisfy the constraint '{ [x: string]: never; }'.
Property 'children' is incompatible with index signature.
Type 'ReactNode' is not assignable to type 'never'.
Type 'undefined' is not assignable to type 'never'.
26 |
27 | // Check the prop type of the entry function
> 28 | checkFields<Diff<PageProps, FirstArg<TEntry['default']>, 'default'>>()
| ^
29 |
30 | // Check the arguments and return type of the generateMetadata function
31 | if ('generateMetadata' in entry) {4 Replies
Netherland Dwarf
It says the error there
Did you try following the suggestion
it must only have
params (if any) and/or searchParams (if any)