TypeError: Cannot read properties of null (reading '_id') – how to solve this error? – Reactjs
I am getting the above error. Model.js const mongoose = require('mongoose'); const Schema = mongoose.Schema; var CourseSchema = new Schema({ courseCode: { type: String, required: true, unique: true, }, courseName: { type: String, required: 'Course Name cannot be blank', },…