Answers for "TypeError: ObjectID is not a constructor"

0

TypeError: ObjectID is not a constructor

for "mongodb": "^4.1.0"
change 
const ObjectID = require('mongodb').ObjectID;
to 
const ObjectId = require('mongodb').ObjectId;
Posted by: Guest on August-24-2021

Code answers related to "TypeError: ObjectID is not a constructor"

Code answers related to "Javascript"

Browse Popular Code Answers by Language