Next.js Discord

Discord Forum

Revalidate path not working as expected

Unanswered
Amur catfish posted this in #help-forum
Open in Discord
Amur catfishOP
I have an app that reads data from a headless CMS. I want to use a webhook in the cms to revalidate the pages that has been changed when you publish them in the cms, however running revalidatePath on them doesn't seem to work at all. I have the following route: /[[...slug]] for all pages, so I run revalidatePath with /[[...slug]] but it doesn't work.

I also tried using revalidateTag, but as we're not using fetch I can't tag anything. I tried using unstable_cache, but as the cached data is recursive it can't stringify it, so taht's not possible either.

All pages have export const dynamic = 'error' and export const dynamicParams = false, so I feel like this may be related to that.
Either I am missunderstanding how revalidation works, or there's a bug in nextjs. Is there someone who knows what the problem might be?

1 Reply

Snowshoe
Revalidation is currently broken as far as I can tell.

https://github.com/vercel/next.js/issues/50714

I am unable to get either path or tag revalidation working in production.