Hello!
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,
searchParams,
}: {
params: { id: string }
searchParams: { otherId?: string }
}) {
return (
<div>
{params.id} - {searchParams.otherId}
</div>
)
}
// netlify.toml
[build]
command = "pnpm install && pnpm run build"
[[plugins]]
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,
Mihail