javascript - MongoDB Client > Invalid Operation, no operations specified - Stack Overflow

NPM Library: "mongodb": "3.1.4"I get the following error, when trying to bulk inser

NPM Library: "mongodb": "3.1.4"

I get the following error, when trying to bulk insert a list of data:

Code:

db.collection('products').insertManyAsync(products, {ordered: false})

Error:

Invalid Operation, no operations specified

NPM Library: "mongodb": "3.1.4"

I get the following error, when trying to bulk insert a list of data:

Code:

db.collection('products').insertManyAsync(products, {ordered: false})

Error:

Invalid Operation, no operations specified

Share Improve this question asked Sep 5, 2018 at 7:38 Nick GrealyNick Grealy 26k9 gold badges111 silver badges126 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

Simple solution (but I couldn't find it listed anywhere), it turns out the products array was empty, which causes the error.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744570136a4581402.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信