anthony
anthony
Explore posts from servers
TTCTheo's Typesafe Cult
Created by anthony on 7/10/2023 in #questions
[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,
}));
}
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!
12 replies