Error: the update operation document must contain atomic operators?

EDIT

Your thoughts?

Dwight The Developer |

This happens when you call findOneAndUpdate but don't pass the update param correctly...

db.getCollection('users').findOneAndUpdate({_id:ObjectId("619931751813962bcf3eb1bf")}, {displayName:"influencer"}, {new:true})

should be...

db.getCollection('users').findOneAndUpdate({_id:ObjectId("619931751813962bcf3eb1bf")}, {$set:{displayName:"influencer"}}, {new:true})

Notice if $set is not used in the update argument then you will get this error!