DYNAMIC_SERVER_USAGE error with parallel and/or intercepted routes #74128
Labels
bug
Issue was opened via the bug report template.
Parallel & Intercepting Routes
Related to Parallel and/or Intercepting routes.
Runtime
Related to Node.js or Edge Runtime with Next.js.
Link to the code that reproduces this issue
https://github.com/diamondT/with-modal-app
To Reproduce
npm run build
npm run start
http://localhost:3005
Current vs. Expected behavior
Current behavior
Application error: a server-side exception has occurred (see the server logs for more information). Digest: DYNAMIC_SERVER_USAGE
Expected Behavior
Clicking the button should navigate to
http://localhost:3005/address/create?type=A
and update the content accordinglyThe page in question is using
searchParams
.Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP PREEMPT_DYNAMIC Thu Nov 14 12:54:01 UTC 2024 (099023b) Available memory (MB): 31992 Available CPU cores: 16 Binaries: Node: 22.9.0 npm: 10.8.3 Yarn: N/A pnpm: N/A Relevant Packages: next: 15.1.1 // Latest available version is detected (15.1.1). eslint-config-next: 15.1.1 react: 19.0.0 react-dom: 19.0.0 typescript: 5.7.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Parallel & Intercepting Routes, Runtime
Which stage(s) are affected? (Select all that apply)
next build (local), next start (local)
Additional context
When running the application in dev mode with
npm run dev
, everything works as expected.Manually marking the page as dynamic with
export const dynamic = 'force-dynamic'
also works as expected.Since the page is using
searchParams
, it should be marked as a dynamic route. The same page as a regular route is indeed identified as dynamic, however the intercepted route is not. Build output:The text was updated successfully, but these errors were encountered: