我将猫鼬更新到最新版本(6.0.2),现在我收到此错误并在.updateOne()执行时粉碎应用程序。但是数据库内部的对象更新。我的代码:
async(req,res) => {\n await Todo.updateOne(\n {_id : req.params.id},\n {\n $set : {\n status : "inactive"\n }\n },\n (updateError) => {\n // if updateError exist\n if (updateError) {\n // print error\n printError(updateError);\n\n // response the error\n res.status(500).json({\n error : "There was a Server Side Error!"\n });\n } else {\n // if error dose not exist\n // print message\n console.log("|===> \xef\xb8\x8f Data Was Updated successfully! \xef\xb8\x8f <====|\\n");\n // response success\n res.json({\n message : "Todo Was Update successfully!"\n });\n …Run Code Online (Sandbox Code Playgroud)