nextjs - 💡(How to fix) Fix Next.js 16: Builds fail as it fails to find Server Actions if they are references in slot/parallel route. [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#85247Fetched 2026-04-08 02:16:48
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×3closed ×1commented ×1issue_type_added ×1

Error Message

Error will appear, failure to find Server Action $xxxxxxxxxx.

Code Example

<form action={async(formData)=>{
   'use server';
   addCustomer(formData);
}}>
...
</form>

---

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Thu Jun  5 18:30:46 UTC 2025
  Available memory (MB): 24031
  Available CPU cores: 24
Binaries:
  Node: 24.9.0
  npm: 11.6.0
  Yarn: N/A
  pnpm: 10.18.2
Relevant Packages:
  next: 16.0.0 // Latest available version is detected (16.0.0).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: N/A
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/yehonatanyosefi/parallel-routes-example

To Reproduce

  1. Create a Server Action in /app/actions/customer.ts
  2. Call Server Action in from submission in /app/customers/page.tsx to confirm it works.
    1. Make slot/parallel route in /app/customers/@customers/page.tsx
    2. Call server action on form submission in parallel route "@customers/page.tsx"
  3. Try to build.

Error will appear, failure to find Server Action $xxxxxxxxxx.

Hack to make work: (DO NOT RECOMENNED)

<form action={async(formData)=>{
   'use server';
   addCustomer(formData);
}}>
...
</form>

I just took the form out of a parallel / slot route, and put it in a child component. No more messing with server-actions and parallel routes in Next 16 for a while.

Current vs. Expected behavior

Server Action should be found.

console.log(serverAction) outputs it fine in terminal console, but calling it on form submission doesn't work.

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Thu Jun  5 18:30:46 UTC 2025
  Available memory (MB): 24031
  Available CPU cores: 24
Binaries:
  Node: 24.9.0
  npm: 11.6.0
  Yarn: N/A
  pnpm: 10.18.2
Relevant Packages:
  next: 16.0.0 // Latest available version is detected (16.0.0).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: N/A
Next.js Config:
  output: N/A

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

Server Actions, Parallel & Intercepting Routes

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

next build (local)

Additional context

No response

extent analysis

TL;DR

The issue can be resolved by reorganizing the code to avoid using Server Actions within parallel routes, as the current implementation causes the Server Action to not be found during form submission.

Guidance

  • The error occurs because the Server Action is not accessible when called from within a parallel route, suggesting a scoping or context issue.
  • To verify the issue, try logging the serverAction variable in the parallel route to confirm it's not being recognized.
  • As a potential workaround, consider moving the form submission logic outside of the parallel route or restructure the code to avoid using Server Actions in this context.
  • Review the Next.js documentation on Server Actions and parallel routes to ensure proper usage and compatibility.

Example

No code example is provided as the issue seems to be related to the structure and usage of Server Actions within parallel routes, which requires a more comprehensive understanding of the project's architecture.

Notes

The provided "hack" is not recommended, indicating that the current implementation might be flawed. The issue seems specific to the combination of Server Actions and parallel routes in Next.js 16.

Recommendation

Apply workaround: Restructure the code to avoid using Server Actions within parallel routes, as this seems to be the root cause of the issue. This approach allows for a more compatible and maintainable solution.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

nextjs - 💡(How to fix) Fix Next.js 16: Builds fail as it fails to find Server Actions if they are references in slot/parallel route. [1 comments, 2 participants]