0

I'm trying to call the makePassword method into the UserSchema.pre('save'). but get this error

(node:8252) DeprecationWarning: Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead: http://mongoosejs.com/docs/promises.html

I've also tries with including the mongoose.Promise = global.Promise; before mongoose.connect(config.database);, Please suggest

DanielKhan
  • 1,190
  • 1
  • 9
  • 18
Shobhit Sharma
  • 483
  • 4
  • 11

1 Answers1

0

this generally happens when a library is missing out..like Bluebird, Q...so try including it in . mongoose.Promise = require('Q');