首页 > 解决方案 > Mongo collection.find().then() 不是函数

问题描述

这个我可以,没问题

myCollection.findOne({_id:"1234"})
    .then(function(element){

    });

但我不能这样做

myCollection.find()
    .then(function(element){

    });

因为显然

TypeError: myCollection.find(...).then 不是函数

标签: javascriptnode.jsmongodb

解决方案


推荐阅读