error 'OmitWithTag while building app
Answered
Magnificent Hummingbird posted this in #help-forum
Magnificent HummingbirdOP
.next/types/app/layout.ts:12:13
Type error: Type 'OmitWithTag<typeof import("D:/progam-code/next-project/pomodoro-app/src/app/layout"), "default" | "metadata" | "config" | "generateStaticParams" | "revalidate" | "dynamic" | "dynamicParams" | ... 7 more ... | "experimental_ppr", "">' does not satisfy the constraint '{ [x: string]: never; }'.
Property 'khand' is incompatible with index signature.
Type 'NextFontWithVariable' is not assignable to type 'never'.
10 |
11 | // Check that the entry is a valid entry
13 | default: Function
14 | config?: {}
15 | generateStaticParams?: Function
how can i fix it
Type error: Type 'OmitWithTag<typeof import("D:/progam-code/next-project/pomodoro-app/src/app/layout"), "default" | "metadata" | "config" | "generateStaticParams" | "revalidate" | "dynamic" | "dynamicParams" | ... 7 more ... | "experimental_ppr", "">' does not satisfy the constraint '{ [x: string]: never; }'.
Property 'khand' is incompatible with index signature.
Type 'NextFontWithVariable' is not assignable to type 'never'.
10 |
11 | // Check that the entry is a valid entry
12 | checkFields<Diff<{| ^
13 | default: Function
14 | config?: {}
15 | generateStaticParams?: Function
how can i fix it
Answered by Asian black bear
You can't export fonts from the layout file. Remove the
export
keyword or move the fonts into a separate file.9 Replies
Asian black bear
You can't export fonts from the layout file. Remove the
export
keyword or move the fonts into a separate file.Answer
Magnificent HummingbirdOP
but i'm watch in a youtube
he export font in _app.tsx, you know _app.tsx is layout next js 13, and it's work
https://www.youtube.com/watch?v=L8_98i_bMMA&t=176s
3:48
he export font in _app.tsx, you know _app.tsx is layout next js 13, and it's work
https://www.youtube.com/watch?v=L8_98i_bMMA&t=176s
3:48
Asian black bear
In the video he uses the pages router, not the app router.
And he doesn't export it either.
Magnificent HummingbirdOP
oh..
okey thank you for you information
okey thank you for you information
Asian black bear
As I've said, just remove the export from your first two fonts.
This should already fix it.
Magnificent HummingbirdOP
okey i will try to fix it
thank you for the solution you provided
now it's successful
now it's successful