mongoose.connect('mongodb://localhost/test');
报错:

(node:2752) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead,
or set the `useMongoClient` option if using `connect()` or `createConnection()`.
See http://mongoosejs.com/docs/connections.html#use-mongo-client
解决:
mongoose.connect('mongodb://localhost/test',{useMongoClient: true});

相关文章:

  • 2021-07-16
  • 2021-08-25
  • 2022-12-23
  • 2021-12-13
  • 2021-11-30
  • 2021-06-29
  • 2022-12-23
  • 2021-10-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
  • 2022-12-23
  • 2021-11-19
相关资源
相似解决方案