MongoError: After applying the update to the document {_id: "895f2731-2122-11
e9-8ed4-a30d938050f7" , ...}, the (immutable) field '_id' was found to have been altered to _id: "751c9c90-229d-11e9-826
a-fb553896c60b"
解决方法:分析日志看修改的内容里面是否有“_id”,删除修改对象里面的"_id".
修改的对象里面不能带“_id”,因为mongodb的"_id"是不能修改的。
如:const updateObj = {
fA: "",
fB:"",
fC:"",
....
};