Unfortunately my environment doesn't recognize the express.json() function.
Property 'json' does not exist on type 'Express'.
This happens when I execute the exact same code.
I made an account just to try and answer your question. Certain versions of Express have bodyParser bundled in with it. If .json() is not working for you you can npm i bodyParser and use that instead. See: stackoverflow.com/questions/472321...
Thank you a lot for doing that! In fact I just had an old version of the @types/express package where the json() function has not existed yet.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Unfortunately my environment doesn't recognize the express.json() function.
Property 'json' does not exist on type 'Express'.
This happens when I execute the exact same code.
I made an account just to try and answer your question. Certain versions of Express have bodyParser bundled in with it. If .json() is not working for you you can npm i bodyParser and use that instead. See: stackoverflow.com/questions/472321...
Thank you a lot for doing that!
In fact I just had an old version of the @types/express package where the json() function has not existed yet.