/nextjs-bug-formdata

There's a bug in NextJS's route handlers and form data

Primary LanguageTypeScript

Issue vercel/next.js#53838

To Reproduce

Run repro repo locally.

git clone git@github.com:0xc00010ff/nextjs-bug-formdata.git
cd nextjs-bug-formdata
npm install
npm run dev
open http://localhost:3000
  • Fill out the simple form
Screen Shot 2023-08-09 at 11 54 03 PM
  • Observe app crash with 500 status and the following error:
Screen Shot 2023-08-09 at 11 51 14 PM

Describe the Bug

The simplest version of a POST route handler with form data fails at
const formData = await request.formData();

Screen Shot 2023-08-09 at 11 49 17 PM