-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Error on server log :
Error: Failed to find Server Action "x". This request might be from an older or newer deployment. Read more: https://nextjs.org/docs/messages/failed-to-find-server-action at async m (.next/server/app/page.js:1:19312) at async p (.next/server/app/page.js:2:1860) at async L (.next/server/app/page.js:2:6944)
Diagnostic :
Le problème venait du fait que Next.js 13+ interprète toute prop action sur un élément
Solution :
fix: resolve Server Action error by renaming action prop to formAction
- Renamed 'action' prop to 'formAction' in FormProps interface
- Updated useFormedible hook to use 'formAction' instead of 'action'
- Prevents Next.js from interpreting the prop as a Server Action
- Fixes 'Failed to find Server Action' error in production
This change resolves the deployment error where Next.js expected a Server
Action but found an API route-based form submission pattern.
To do (replace) :
apps/web/src/hooks/use-formedible.tsx :
- L1433 : action, => formAction,
- L2234 : action={action} => action={formAction}
apps/web/src/lib/formedible/types.ts :
- L1094 : action?: string; => formAction?: string;
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels