Simple Next.js app timing out in SSR lambda handle


I have a simple Next.js app (v13+ with server components and app dir) deployed to Netlify that always times out on the first request (after a hard refresh it loads just fine).

// src/app/[id]/page.tsx
export default async function Page({
}: {
  params: { id: string }
  searchParams: { otherId?: string }
}) {
  return (
      {} - {searchParams.otherId}
// netlify.toml
  command = "pnpm install && pnpm run build"

package = "@netlify/plugin-nextjs"

When I try to access the URL after a successful deploy I get this error message

I assume it’s because of the cold start of the lambda function, but this shouldn’t take longer than 1 second. Any ideas on how I can fix this?

Thank you,

I managed to solve this in the end, just by updating Next.js version from 13.4.3 to 13.4.9. Feel free to mark as solved / close this thread. Thank you!

Thanks for coming back and sharing your solution!