Following is my user schema in user.js model -
user
user.js
var userSchema = new mongoose.Schema({ local: { name: { type: String },
In this situation, log in to Mongo find the index that you are not using anymore (in OP's case 'email'). Then select Drop Index