I am using \"mongoose\": \"^5.7.1\" in my Node.js project. I am making an api which involves updating in two documents. So, I am using the transactions like fol
Transactions are undoubtedly the most exciting new feature in MongoDB 4.0. But unfortunately, most tools for installing and running MongoDB start a standalone server as opposed to a replica set. If you try to start a session on a standalone server, you'll get this error.
This issue can be resolved by using replica-sets on your local environment.
I have used run-rs for this purpose.