服务器上的pm2日志报出这两个错误是什么原因?但不影响运行,如何解决?
来源:10-4 部署发布电影网站并连接线上 MongoDB
坨坨儿
2017-07-16
2|Movie | (node:20024) 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
2|Movie | Db.prototype.authenticate method will no longer be available in the next major release 3.x as MongoDB 3.6 will only allow auth against users in the admin db and will no longer allow multiple credentials on a socket. Please authenticate using MongoClient.connect with auth credentials.
我尝试升级了mongoose和connect-mongo仍然不行,加了mongoose.Promise=bluebird后也没用?
1回答
-
Scott
2017-07-17
可以先把 mongoose 的版本退回到老一点版本,比如 4.10.6 或者更老一些的版本试试看,应该是版本不兼容问题,有重大 breaking changes
122017-07-18
相似问题