Turbopack Error: "Failed to find Server Action" when passing re-exported server actions from RSC to Client Components #78529
Labels
linear: turbopack
Confirmed issue that is tracked by the Turbopack team.
Server Actions
Related to Server Actions.
Turbopack
Related to Turbopack with Next.js.
Link to the code that reproduces this issue
https://github.com/ryanburns23/failed-to-find-server-action
To Reproduce
next dev --turbopack
Error: Failed to find Server Action
Current vs. Expected behavior
Current Behavior:
When calling the
logAction()
server action, a terminal error appears:Error: Failed to find Server Action
.Expected Behavior:
The server action (
logAction()
) should execute normally without the error message.Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:11 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6020 Available memory (MB): 98304 Available CPU cores: 12 Binaries: Node: 22.13.0 npm: 10.9.2 Yarn: N/A pnpm: 10.6.2 Relevant Packages: next: 15.4.0-canary.9 // Latest available version is detected (15.4.0-canary.9). eslint-config-next: N/A react: 19.1.0 react-dom: 19.1.0 typescript: 5.8.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Server Actions, Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
lib.ts
). Specifically, the current setup inactions.ts
looks like this:logAction()
directly withinactions.ts
(with"use server"
at the top) prevents the issue.--turbopack
flag). If testing without Turbopack, you may need to delete the.next
folder first.The text was updated successfully, but these errors were encountered: