Next.js Discord

Discord Forum

unknown build error nextjs

Unanswered
American black bear posted this in #help-forum
Open in Discord
American black bearOP
import { HydrateClient } from '@/trpc/server';

interface Props {
    children: React.ReactNode;
    params: Promise<{ guildId: string }>;
}

export default async function Overview({ params }: Props) {
    const { guildId } = await params;

    return (
        <HydrateClient>
            <h1>hi</h1>
        </HydrateClient>
    );
}

Hey, for some reason I am getting an odd build error in my server component:
dashboard:build: > next build
dashboard:build:
dashboard:build:    ▲ Next.js 15.1.7
dashboard:build:
dashboard:build:    Creating an optimized production build ...
dashboard:build:  ✓ Compiled successfully
dashboard:build:    Linting and checking validity of types ...
dashboard:build: Failed to compile.
dashboard:build:
dashboard:build: .next/types/app/dashboard/[guildId]/overview/page.ts:34:13
dashboard:build: Type error: Type 'OmitWithTag<Props, keyof PageProps, "default">' does not satisfy the constraint '{ [x: string]: never; }'.
dashboard:build:   Property 'children' is incompatible with index signature.
dashboard:build:     Type 'ReactNode' is not assignable to type 'never'.
dashboard:build:       Type 'undefined' is not assignable to type 'never'.
dashboard:build:
dashboard:build:   32 |
dashboard:build:   33 | // Check the prop type of the entry function
dashboard:build: > 34 | checkFields<Diff<PageProps, FirstArg<TEntry['default']>, 'default'>>()
dashboard:build:      |             ^
dashboard:build:   35 |
dashboard:build:   36 | // Check the arguments and return type of the generateMetadata function
dashboard:build:   37 | if ('generateMetadata' in entry) {
dashboard:build: Next.js build worker exited with code: 1 and signal: null
dashboard:build:  ELIFECYCLECommand failed with exit code 1.

0 Replies