message: path is required message: path is required mongoose mongoose

message: path is required


He bro.. Check this image.. I was also facing same problem.. and here is what I was doing wrong.enter image description here


I believe your problem might be that body-parser is not configured.

Try npm installing body-parser, then import it at the top of your main server file:

bodyParser = require('body-parser');

Finally, configure it for use. This will allow you to use x-www-form-urlencoded:

// Setting up basic middleware for all Express requestsapp.use(bodyParser.urlencoded({ extended: false })); // Parses urlencoded bodiesapp.use(bodyParser.json()); // Send JSON responses


Check your     req.body.author,    req.body.rating,    req.body.reviewTextThey must be coming as empty string