From 6a9736e3955acd6bdffcebf6465a0ecd67f4d12f Mon Sep 17 00:00:00 2001 From: Alexandre Baizeau Date: Mon, 2 Oct 2023 15:46:48 -0400 Subject: [PATCH] fix: Invalid URL (404) provided on server actions error --- packages/next-swc/crates/core/src/server_actions.rs | 2 +- .../tests/errors/server-actions/client-graph/1/output.stderr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/next-swc/crates/core/src/server_actions.rs b/packages/next-swc/crates/core/src/server_actions.rs index 87b1954e7255b..0abaa51b8c39b 100644 --- a/packages/next-swc/crates/core/src/server_actions.rs +++ b/packages/next-swc/crates/core/src/server_actions.rs @@ -110,7 +110,7 @@ impl ServerActions { 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() }); diff --git a/packages/next-swc/crates/core/tests/errors/server-actions/client-graph/1/output.stderr b/packages/next-swc/crates/core/tests/errors/server-actions/client-graph/1/output.stderr index 8deb33bca9a6d..9f20dd6734675 100644 --- a/packages/next-swc/crates/core/tests/errors/server-actions/client-graph/1/output.stderr +++ b/packages/next-swc/crates/core/tests/errors/server-actions/client-graph/1/output.stderr @@ -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() {