Next.js Discord

Discord Forum

Build issue

Unanswered
Spectacled Caiman posted this in #help-forum
Open in Discord
Spectacled CaimanOP
guys im trying to npm run build and i am getting an issue
this is the code

2 Replies

In next 15 params and searchParams are asynchronous, you have to type them as a Promise

also your folder name is eventUrl and you are trying to get params.eventName, is this correct?

try something like
 const BookinPage = async ({
  params,
}: {
  params: Promise<{ username: string; eventUrl: string }>;
  searchParams: Promise<{ date?: string; time?: string }>;
}) => {
  const { username, eventUrl } = await params;
Spectacled CaimanOP
thanks!! that worked