Skip to content

Commit eeb9b33

Browse files
alexBaizeauztanner
andauthored
fix: Invalid URL (404) provided on server actions error (#56323)
Co-authored-by: Zack Tanner <[email protected]>
1 parent 3172cfe commit eeb9b33

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/next-swc/crates/core/src/server_actions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ impl<C: Comments> ServerActions<C> {
110110
handler
111111
.struct_span_err(
112112
body.span,
113-
"It is not allowed to define inline \"use server\" annotated Server Actions in Client Components.\nTo use Server Actions in a Client Component, you can either export them from a separate file with \"use server\" at the top, or pass them down through props from a Server Component.\n\nRead more: https://nextjs.org/docs/app/api-reference/server-actions#with-client-components\n",
113+
"It is not allowed to define inline \"use server\" annotated Server Actions in Client Components.\nTo use Server Actions in a Client Component, you can either export them from a separate file with \"use server\" at the top, or pass them down through props from a Server Component.\n\nRead more: https://nextjs.org/docs/app/api-reference/functions/server-actions#with-client-components\n",
114114
)
115115
.emit()
116116
});

packages/next-swc/crates/core/tests/errors/server-actions/client-graph/1/output.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
x It is not allowed to define inline "use server" annotated Server Actions in Client Components.
33
| To use Server Actions in a Client Component, you can either export them from a separate file with "use server" at the top, or pass them down through props from a Server Component.
44
|
5-
| Read more: https://nextjs.org/docs/app/api-reference/server-actions#with-client-components
5+
| Read more: https://nextjs.org/docs/app/api-reference/functions/server-actions#with-client-components
66
|
77
,-[input.js:3:1]
88
3 | export default function App() {

0 commit comments

Comments
 (0)