Next.js Discord

Discord Forum

Statically Generated Pages Not Updating Code After Deployment

Treeing Cur posted this in #help-forum
Open in Discord
Treeing CurOP
I'm unable to replicate this issue in a different repository, but I've already invested several hours trying to resolve it.

Initially, one of my pages was triggering a 500 error due to dynamic functions involving cookies. After removing this function and deploying again, the issue persisted as if the change hadn't been made. Multiple code modifications and renaming the page function didn't resolve the issue either; the deployed code continued to differ from what was in the repository. The build logs correctly reflected the latest commit, but the deployed code's Sentry traceback did not align.

The problem was temporarily resolved when I set export const revalidate = 0. However, reverting the revalidate value reintroduces the error. Additionally, not using the build cache hasn't been effective.

For filing a bug issue on GitHub, a link for reproduction is required, but I suspect this is a caching error specific to Vercel.

0 Replies