We need a way to revalidate static routes❗ #60641
Unanswered
Sammeeey
asked this question in
App Router
Replies: 2 comments 1 reply
-
Are you facing the issue only on production? In development everything is fine? if it is yes, then maybe the reason is---
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Just hit this issue today |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I almost became insane when I tried to revalidate my static page from a server action after adding new records to my database via web form on Vercel.
Locally it works fine.
But in production on Vercel it doesn't.
I was 100% sure this would and should work.
But it seems that Next.js/Vercel simply doesn't bother revalidating static routes via
revalidatePath()
- at least if you don't directly redirect to them afterwards.That's the server action:
/ad
is the static route.This route doesn't display the newly created ad afterwards.
However it works perfectly fine for the the dynamic route (
/ad/${category}
).And when I make the route dynamic by adding
export const dynamic = 'force-dynamic'
to the respectivepage.tsx
,revalidatePath()
in my server action suddenly works for that route too.Shouldn't it actually be possible to revalidate static paths as well?
Beta Was this translation helpful? Give feedback.
All reactions