Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
Setting cacheComponents=true breaks Clerk sign-in route with “Uncached data outside <Suspense>” during build | GoodFirstPicks

Setting cacheComponents=true breaks Clerk sign-in route with “Uncached data outside <Suspense>” during build

vercel/next.js 13 comments 11d ago
View on GitHub
highopenScope: somewhat clearSkill match: maybeNext.jsTypeScriptReact

Why this is a good first issue

Cache component feature breaks Clerk sign-in route with unclear Suspense boundary requirements.

AI Summary

The issue involves cacheComponents breaking Clerk sign-in routes during build with Suspense boundary errors, despite proper wrapping. The problem appears to be in the interaction between Next.js caching and Clerk's provider, with maintainers suggesting layout refactoring but no clear solution yet.

Issue Description

Link to the code that reproduces this issue

https://github.com/techotaku1/gonzaapp

To Reproduce

  1. git clone https://github.com/techotaku1/gonzaapp
  2. cd gonzaapp
  3. npm install
  4. Set the Clerk test env vars (sample keys included in .env)
  5. npm run build -- --debug-prerender
  6. Observe the failure while prerendering /sign-in/[[...sign-in]]

Current vs. Expected behavior

Current: Build fails with “Route "/sign-in/[[...sign-in]]": Uncached data was accessed outside of ” even though /sign-in is a client component wrapped in Suspense and contains no server-side data fetch.

Expected: With cacheComponents enabled, the build should succeed (or at least fallback to “Cargando...”) without aborting.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 10.0.22631
Binaries:
  Node: 22.21.0
  npm: 11.6.2
Relevant Packages:
  next: 16.0.0
  eslint-config-next: 16.0.0
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.5.4
Next.js Config:
  cacheComponents: true

Which area(s) are affected? (Select all that apply)

Use Cache, Partial Prerendering (PPR), TypeScript

Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), Vercel (Deployed)

Additional context

Disabling cacheComponents makes the build succeed. I also tried wrapping the entire client layout in Suspense, moving the Clerk sign-in into a client-only component, and calling next/cache noStore(), but the build still fails. Reproduces on Next.js 16.0.0 and 16.0.1-canary. Deploying to Vercel shows the same build failure.

GitHub Labels

TypeScriptlinear: nextCache Components

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 30 points when you complete it!

Risk Flags

  • cacheComponents interaction
  • Clerk provider integration
  • Suspense boundary issues
Loading labels...

Details

Points30 pts
Difficultyhigh
Scopesomewhat clear
Skill Matchmaybe
Test Focusedno