E11000 duplicate key error index in mongodb mongoose

前端 未结 25 2211
自闭症患者
自闭症患者 2020-11-22 05:49

Following is my user schema in user.js model -

var userSchema = new mongoose.Schema({
    local: {
        name: { type: String },
         


        
25条回答
  •  佛祖请我去吃肉
    2020-11-22 06:35

    I was facing similar issue, I went about clearing idexes and restarting server and probably almost everything mentioned here according to my understanding and still there was error, turns out the jsonwebtoken secret key that i was passing was undefined, if you are using jsonwebtoken, do check it once

提交回复
热议问题