Error module.exports mongoose

I have this Schema and when I try to export, the mongoose it gives an error.

My Schema:

const mongoose = require('../../config/db');

const AgendaSchema = new mongoose.Schema({

  nome: {type: String},
  adress: {type: String},
  data: {type: Date},
  createdAt: {type: Date, default: Date.now}
});

module.exports = mongoose.model('Agenda', AgendaSchema);

我只需要降级到4.8.5猫鼬版本,现在它正在工作。

链接地址: http://www.djcxy.com/p/89568.html

上一篇: 里面的Mongoose返回数据

下一篇: 错误module.exports猫鼬