Error in Mongo connection

I am having an error while sending signup request to bakend (node.js + mongo).
error - Query.prototype.exec() no longer accepts a callback

@Rahul_Sutar, as per the release announcement at MongoDB Nodejs Driver 5.0.0 Released, callbacks were removed in favour of a Promise-based API.

To ease the migration to a Promise-only approach when using the Node.js driver, callback support is available via the mongodb-legacy package. You can read more about this change in the Optional callback support migrated to mongodb-legacy section of the migration guide.

1 Like