Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Safiya-B opened this issue Aug 16, 2023 · 0 comments
Open
Labels
question Further information is requested

Comments

@Safiya-B
Copy link

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 👍

@Safiya-B Safiya-B added the question Further information is requested label Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant