Skip to content Skip to sidebar Skip to footer

Why Getting Error When Updating MongoDb?

I am building backend with MEAN stack, but when I try to update document in the db i am getting an error: topUp = function(name, amount, callback) { User.updateOne( {

Solution 1:

I think it's not defined in the database driver that you might be using. I think you are using Mongoose and updateOne() is not available there. You cannot use all native mongodb functions with all drivers


Solution 2:


Post a Comment for "Why Getting Error When Updating MongoDb?"