Cache Issues with Next.js 14 on Vercel After Deployment
Unanswered
Osyed posted this in #help-forum
OsyedOP
Hi guys, I'm facing an issue with my Next.js 14 app hosted on Vercel.
The app fetches data from WIX via the WIX SDK, creates all pages statically at build time, and I use the VERCEL_NO_BUILD_CACHE environment variable to avoid build cache.
After deployment, the site loads fine on the first visit, but on subsequent visits, some pages break, and I receive the following error on a Wix request:
The current user does not have the permissions to find on the xx collection.
The issue is resolved after manually revalidating or purging the cache.
How can I ensure up-to-date data after deployment without needing manual cache purging or revalidation?
The app fetches data from WIX via the WIX SDK, creates all pages statically at build time, and I use the VERCEL_NO_BUILD_CACHE environment variable to avoid build cache.
After deployment, the site loads fine on the first visit, but on subsequent visits, some pages break, and I receive the following error on a Wix request:
The current user does not have the permissions to find on the xx collection.
The issue is resolved after manually revalidating or purging the cache.
How can I ensure up-to-date data after deployment without needing manual cache purging or revalidation?
5 Replies
I believe its a issue with wix
OsyedOP
@"use php" Thanks, please take a look at this https://github.com/orgs/vercel/discussions/1808 , the guys had similar issue and he was able to fix it it with no build cache
You can create a github webhook, which creates a deployment in vercel after purging cache
OsyedOP
I managed to achieve build cache skip using VERCEL_NO_BUILD_CACHE env var, but the issue persists