[Next.js App Router] Dynamic segment 404 on Vercel, but not local production build

Hello! I've been facing an issue on a production/preview Vercel instance of my app.

On build, I have generateStaticParams to generate my routes at build time. The expected behavior though is that the routes are to be dynamically generated for future changes with data (i.e. a new date being returned from getDailyTitleDates())

export async function generateStaticParams() {
  const dates: string[] = await getDailyTitleDates();

  return dates.map((date: string) => ({
    date,
  }));
}


This is not the case as I'm getting 404ed on Vercel.

However, I did next build and next start locally and the expected behavior is happening.

I've tried researching on my own what issue I could be having. I do believe I understand the docs, but there's something I could be missing here.

Any help is appreciated!
Solution
GitHub
Verify canary release I verified that the issue exists in the latest Next.js canary release Provide environment information Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Ver...
Was this page helpful?