尽管蓝鸟,猫鼬还是给予了贬值警告?

时间:2017-08-06 11:07:32

标签: node.js mongoose bluebird nextjs

在编译Node-Mongoose(NextJS)应用程序时,我经常遇到以下错误:

  

DeprecationWarning:Mongoose:mpromise(mongoose' s默认承诺   库)已弃用,请插入您自己的promise库:   http://mongoosejs.com/docs/promises.html

我已经拥有蓝鸟承诺引擎,并且无法弄清楚我错过的任何其他内容。我的服务器文件具有以下声明(当然还有其他声明):

const mongoose = require('mongoose');
const bluebird = require('bluebird');

mongoose.Promise = bluebird;
mongoose.connect(process.env.MONGO_PATH, {
  useMongoClient: true,
  promiseLibrary: bluebird
});

我的模型文件包含以下内容:

const mongoose = require('mongoose');
mongoose.Promise = require('bluebird');

const Schema = mongoose.Schema;
const passportLocalMongoose = require('passport-local-mongoose');

我错过了什么?

0 个答案:

没有答案