-
Notifications
You must be signed in to change notification settings - Fork 28.3k
use cache doesn't work properly with dynamic routes #72529
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
Comments
I had the same error and was able to fix encapsulating the page with Suspense:
|
Could you add the error message that you're getting to the issue description? That helps us see if we're reproducing the issue correctly. I'm getting this, is this also what you're seeing?
(The full log is basically the same, repeated a couple times)
|
No update on this? Is it expected that use cache just isn't compatible with dynamic routes? |
Link to the code that reproduces this issue
https://github.com/cantemizyurek/next-js-dynamic-io-bug-report
To Reproduce
Create a dynamic route [id] and put this code inside and try to build application. Throws error I think it should not be throwing.
And works as expected in dev mode.
Current vs. Expected behavior
Not to throw errors when building
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.1.0: Thu Oct 10 22:05:53 PDT 2024; root:xnu-11215.41.3~5/RELEASE_ARM64_T6030 Available memory (MB): 36864 Available CPU cores: 12 Binaries: Node: 22.11.0 npm: 10.9.0 Yarn: N/A pnpm: 9.6.0 Relevant Packages: next: 15.0.4-canary.3 // Latest available version is detected (15.0.4-canary.3). eslint-config-next: 15.0.4-canary.3 react: 19.0.0-rc-66855b96-20241106 react-dom: 19.0.0-rc-66855b96-20241106 typescript: 5.6.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
dynamicIO
Which stage(s) are affected? (Select all that apply)
next build (local), Vercel (Deployed)
Additional context
No response
The text was updated successfully, but these errors were encountered: