Calling a server action from a client component throws TypeError: e._formData.get is not a function. It happens on the dev server (sometimes after edits or page refreshes, after which all server actions stay broken) and some reporters saw it on Vercel production too. Rerunning the dev server sometimes fixes it temporarily. yarn build + start hides it for some reporters. Users traced it to apps importing the Appwrite or @twilio/conversations SDKs.
TypeError: e._formData.get is not a function when calling a Server Action in Next.js
- Next.jsframework
- isomorphic-form-datalibrary
- React Server Actionsframework
- Server Actionproduct
- Appwriteproduct
- @twilio/conversationslibrary
- +5 more
The culprit is the isomorphic-form-data package, pulled in by older Appwrite and Twilio SDKs: it overwrites Node's native global.FormData with the form-data package, which does not implement the Web FormData#get() API that React Server Actions require. A maintainer reproduced the exact error only when that package was loaded and closed it as an incompatible third-party polyfill. Fix: upgrade the affected SDK (Appwrite removed the dependency in v15.0.0; current Twilio Conversations versions no longer include it) and restart the dev server — Fast Refresh cannot undo the global mutation. Workarounds if you can't upgrade: alias isomorphic-form-data to a stub file via webpack NormalModuleReplacementPlugin, via Turbopack's experimental.turbo.resolveAlias, or override it to npm:form-data@4.0.4 in pnpm-workspace.yaml. Source: https://github.com/vercel/next.js/issues/60687