Note that ISODate
is a part of MongoDB and is not available in your case. You should be using Date
instead and the MongoDB drivers(e.g. the Mongoose ORM that you are currently using) will take care of the type conversion between Date
and ISODate
behind the scene.