Skip to content

How do I find out the issue with 'next build' #74437

Answered by icyJoseph
landed1 asked this question in Help
Discussion options

You must be logged in to vote

Hi,

Not sure why your terminal is not printing all errors, but you have an issue with app/[cat]/page.tsx:

app/[cat]/page.tsx
Type error: Type '{ params: { cat: string; }; }' does not satisfy the constraint 'PageProps'.
  Types of property 'params' are incompatible.
    Type '{ cat: string; }' is missing the following properties from type 'Promise<any>': then, catch, finally, [Symbol.toStringTag]

Do these:

type PostParams = {
  params: Promise<{ cat: string }>;
  searchParams?: Promise<{ [key: string]: string | string[] | undefined }>;
};

// and then further down

export async function generateMetadata({
  params,
}: {
  params: Promise<{ cat: string }>; // -> here, or better yet
}) {

//…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@landed1
Comment options

@icyJoseph
Comment options

@landed1
Comment options

Answer selected by landed1
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants