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
Simple solution (but I couldn't find it listed anywhere), it turns out the products
array was empty, which causes the error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With