Skip to content

Commit

Permalink
fix: Invalid URL (404) provided on server actions error (#56323)
Browse files Browse the repository at this point in the history
Co-authored-by: Zack Tanner <zacktanner@gmail.com>
  • Loading branch information
alexBaizeau and ztanner committed Oct 2, 2023
1 parent 3172cfe commit eeb9b33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/next-swc/crates/core/src/server_actions.rs
Expand Up @@ -110,7 +110,7 @@ impl<C: Comments> ServerActions<C> {
handler
.struct_span_err(
body.span,
"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",
"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",
)
.emit()
});
Expand Down
Expand Up @@ -2,7 +2,7 @@
x It is not allowed to define inline "use server" annotated Server Actions in Client Components.
| 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.
|
| Read more: https://nextjs.org/docs/app/api-reference/server-actions#with-client-components
| Read more: https://nextjs.org/docs/app/api-reference/functions/server-actions#with-client-components
|
,-[input.js:3:1]
3 | export default function App() {
Expand Down

0 comments on commit eeb9b33

Please sign in to comment.