You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Connect to a supabase database API via rest API / fetch request, use any simple table (I included one in the repro). If you want the envs for my supabase project, please contact me!
You should expect caching to work fine locally
Deploy to vercel
You will get a build error during deployment
Error: Failed to fetch Characters
at a (.next/server/app/page.js:1:4180)
at async (.next/server/app/page.js:1:4340)
Error while saving cache key: 1:07b:["gNnGMfGCu32XhRJb5suxP","8036a92083ff12d0a29d47770ee8282f2e526d9878",[{"params":"$@1","searchParams":"$@2"},"$undefined"]]1:12:{} Error: Failed to fetch Characters
at a (.next/server/app/page.js:1:4180)
at async (.next/server/app/page.js:1:4340)
Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
Error: Failed to fetch Characters
at a (/vercel/path0/.next/server/app/page.js:1:4180)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async /vercel/path0/.next/server/app/page.js:1:4340
Export encountered an error on /page: /, exiting the build.
⨯ Static worker exited with code: 1 and signal: null
Error: Command "npm run build" exited with 1
I tried moving 'use cache' to the function level as well and received a similar error
Error: Failed to fetch Characters
at <unknown> (.next/server/app/page.js:1:4261)
Error while saving cache key: ["ge1SJkQqAT9VVH029AGFm","c036a92083ff12d0a29d47770ee8282f2e526d9878",["1"]] Error: Failed to fetch Characters
at <unknown> (.next/server/app/page.js:1:4261)
Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
Error: Failed to fetch Characters
at /vercel/path0/.next/server/app/page.js:1:4261
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
Export encountered an error on /page: /, exiting the build.
⨯ Static worker exited with code: 1 and signal: null
Error: Command "npm run build" exited with 1
I know 'use cache' is still experimental, but I'm not really sure if there is a suitable caching alternative in nextjs 15 right now. unstable_cache does not seem to work very well either. If this won't be fixed for some time, I would really appreciate it if someone could recommend the best way to cache a page in next 15 without 'use cache'. Thanks!
Current vs. Expected behavior
Properly deploys / caches page
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.2.0: Fri Dec 6 19:03:40 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6041
Available memory (MB): 24576
Available CPU cores: 14
Binaries:
Node: 23.5.0
npm: 10.9.2
Yarn: 1.22.22
pnpm: 9.15.2
Relevant Packages:
next: 15.2.0-canary.14 // There is a newer canary version (15.2.0-canary.15) available, please upgrade!
eslint-config-next: 15.1.5
react: 19.0.0
react-dom: 19.0.0
typescript: 5.7.3
Next.js Config:
output: N/A
⚠ There is a newer canary version (15.2.0-canary.15) available, please upgrade!
Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
Read more - https://nextjs.org/docs/messages/opening-an-issue
Which area(s) are affected? (Select all that apply)
dynamicIO
Which stage(s) are affected? (Select all that apply)
Vercel (Deployed)
Additional context
No response
The text was updated successfully, but these errors were encountered:
Link to the code that reproduces this issue
https://github.com/williamlmao/cache-test
To Reproduce
I tried moving 'use cache' to the function level as well and received a similar error
I know 'use cache' is still experimental, but I'm not really sure if there is a suitable caching alternative in nextjs 15 right now.
unstable_cache
does not seem to work very well either. If this won't be fixed for some time, I would really appreciate it if someone could recommend the best way to cache a page in next 15 without 'use cache'. Thanks!Current vs. Expected behavior
Properly deploys / caches page
Provide environment information
Which area(s) are affected? (Select all that apply)
dynamicIO
Which stage(s) are affected? (Select all that apply)
Vercel (Deployed)
Additional context
No response
The text was updated successfully, but these errors were encountered: