-
Notifications
You must be signed in to change notification settings - Fork 27.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the deployment environment revalidation request does not work in ‘/’ page #68481
Comments
We cannot easily recreate the issue with the provided information. Please add a minimal reproduction in order for us to be able to help more efficiently. Why was this issue marked with the
|
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/heeeete/qqq
To Reproduce
There is a component on the ‘/’ path that displays products, and the request is sent as follows:
Additionally, on the ‘/sell’ page, the API makes the following revalidation requests:
At first, I tried only revalidateTag('products'); but the revalidation request did not work. Then I added revalidatePath('/'); and revalidatePath('/shop');, and when that didn’t work, I added revalidatePath(${process.env.NEXTAUTH_URL}/); and revalidatePath(${process.env.NEXTAUTH_URL}/shop);.
Despite these attempts, the ‘/’ page data remains the same as it was during the build. The revalidate: 10 revalidation option also does not work.
Even
router.refresh()
is not working on the ‘/’ page, while it works fine on other pages.However, everything works fine in the local development environment. In the deployment environment using
next run build and next run start
revalidation does not occur no matter what.
Additionally, we are using
React Query
, but even withstaleTime = 0
, it always fetches the previous data in CSR. This issue also occurs only on the ‘/’ page.When force-dynamic is added to the top of the route.js file, revalidation occurs on the ‘/’ path in sync with the revalidation timing of other pages. Why is this happening?
Current vs. Expected behavior
Main Page Revalidation Request Not Working
Expected Behavior:
When the function
revalidateTag('products');
is executed, all requests using the ‘products’ tag should be revalidated.Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.6.0: Fri Jul 5 17:56:41 PDT 2024; root:xnu-10063.141.1~2/RELEASE_ARM64_T6000 Available memory (MB): 16384 Available CPU cores: 10 Binaries: Node: 22.3.0 npm: 10.8.1 Yarn: 1.22.19 pnpm: 8.14.0 Relevant Packages: next: 14.2.5 // Latest available version is detected (14.2.5). eslint-config-next: 14.2.3 react: 18.3.1 react-dom: 18.3.1 typescript: 5.4.5 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local), Vercel (Deployed)
Additional context
No response
The text was updated successfully, but these errors were encountered: