javascript – ERROR HttpErrorResponse { headers: HttpHeaders, status: 500 Cannot read properties of undefined (reading ’email’)

backend> routes>user.js const express = require(“express”); const bcrypt = require(“bcrypt”); const jwt = require(“jsonwebtoken”) const User = require(“../model/user”); // const user = require(“../models/user”); const router = express.Router(); router.post(“/signup”, (req, res, next) => { bcrypt.hash(req.body.password, 10) .then(hash => { const user = new User({ email:req.body.email, password: hash }) user.save() .then(result => { res.status(201).json({ message:’User created!’, result: … Read more