twilio / twilio-video-app-react

A collaboration application built with the twilio-video.js SDK and React.js
Apache License 2.0
1.81k stars 728 forks source link

The request body is undefined unless we add bodyParser or express.json #817

Open Safiya-B opened 1 year ago

Safiya-B commented 1 year ago

Question Hi, I just wanted to note that I had this error appear when I ran the server locally :

Screenshot 2023-08-16 at 19 55 57

I found out it was caused by the req.body that was undefined, so I fixed it by adding the express.json() middleware in the index.ts file. Additional context

Screenshot 2023-08-16 at 19 59 30

Was there another way to make it work without adding the middleware?

Thank you for the app, it is very helpful 👍