Unhandled rejection Mongoerror

Unhandled rejection MongoError: Unsupported OP_QUERY command: insert. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcod
e-removal …how do i solve that? please

Can you please show the code you wrote which caused the issue?

The link is not working for me so, can you fix that as well?
I searched and found this: https://www.mongodb.com/docs/manual/legacy-opcodes/
is this what you meant to share?

By the way:

can you use this and execute again and share with us how it goes:

try {
    // your code that is causing issue
}
catch (ex) {
    console.log('something must be wrong', ex);
    // share with us the output of this in the console.
}

Thanks!

hi and thank for answering, it happens to me in the rentals.js file

Here is what I know.

Fawn is a library to help you create transactions (a concept where the all the database operations should either succeed or fail) in MongoDB.

I tried to use Fawn but couldn’t use it either because it’s outdated and probably there is no workaround to fix this (just my opinion).

I am not a MongoDB expert either (just good with MySQL only).

What I suggest is that, don’t use Fawn library just to create a transaction. Get the concept and later explore MongoDB concept for Two Phase Commit.