Error while building project
Unanswered
gref9730 posted this in #help-forum
gref9730OP
Hello I created next js project in typescript and when I try to build it im getting errors which I have no clue why its happening ...
I have
- layout.tsx
-page.tsx
|- [id]
|-page.tsx
im both in layout.tsx and page.tsx and in the inner page.tsx prop drilling children ...as like so
✓ Compiled successfully
Linting and checking validity of types ...Failed to compile.
.next/types/app/(title)/prodInfos/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 'string' 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) {I have
- layout.tsx
-page.tsx
|- [id]
|-page.tsx
im both in layout.tsx and page.tsx and in the inner page.tsx prop drilling children ...as like so
({
children,
}: {
children: React.ReactNode;
})