I'm trying to start a MEAN-stack server, however I'm getting this error msg:
Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead: http://mongoosejs.com/docs/promises.html
I tried to search some answers here but the one that I found wasn't clear enough for me:
(node:3341) DeprecationWarning: Mongoose: mpromise
I found the file calling the mongoose.connect, but the codes on that issue didn't work for me, can anyone explain for me how it works?
use this code,before the mongo connection and this will resolve the promise problem.
mongoose.Promise = global.Promise;
1.4m articles
1.4m replys
5 comments
57.0k users