This error message is confusing me. I donot know to read its log message.

Code:
D:\JumpStartNodeJs\nockmarket\node_modules\mongodb\lib\mongodb\db.js:1649
    if(callback) callback(new Error("no open connections"), null);
                 ^
TypeError: object is not a function
    at Db._executeInsertCommand (D:\JumpStartNodeJs\nockmarket\node_modules\mong
odb\lib\mongodb\db.js:1649:18)
    at insertAll (D:\JumpStartNodeJs\nockmarket\node_modules\mongodb\lib\mongodb
\collection.js:303:26)
    at Collection.insert (D:\JumpStartNodeJs\nockmarket\node_modules\mongodb\lib
\mongodb\collection.js:81:3)
    at Object.module.exports.insert (D:\JumpStartNodeJs\nockmarket\lib\db.js:25:
23)
    at Object.module.exports.insertOne (D:\JumpStartNodeJs\nockmarket\lib\db.js:
28:18)
    at submitRandomOrder (D:\JumpStartNodeJs\nockmarket\nockmarket.js:21:6)
    at D:\JumpStartNodeJs\nockmarket\nockmarket.js:84:3
    at D:\JumpStartNodeJs\nockmarket\node_modules\mongodb\lib\mongodb\db.js:247:
16
    at null.<anonymous> (D:\JumpStartNodeJs\nockmarket\node_modules\mongodb\lib\
mongodb\connection\server.js:383:7)
    at EventEmitter.emit (events.js:95:17)
Any ideas on how to fix this code?