egg-mongo-native icon indicating copy to clipboard operation
egg-mongo-native copied to clipboard

when use insertOne have a error

Open munitioner opened this issue 4 years ago • 3 comments

this is my code and error 微信截图_20201116201430 微信截图_20201116201455

munitioner avatar Nov 16 '20 12:11 munitioner

this is my code and error

微信截图_20201116201430

微信截图_20201116201455

错误提示很清楚,this.app.mongo undefined。检查插件是否成功启用(可以检查 log)并逐步打印 mongoapp 对象排查。

brickyang avatar Nov 16 '20 12:11 brickyang

插件可以正常使用,find和updateOne都正常

munitioner avatar Nov 16 '20 12:11 munitioner

插件可以正常使用,find和updateOne都正常

在同一个环境内吗?

连续打印三行

console.log(this.app.mongo);
console.log(this.app.mongo.find);
console.log(this.app.mongo.insertOne);

brickyang avatar Nov 16 '20 12:11 brickyang