I am using official node-mongodb-native driver in my project. Which was installed by doing npm install mongodb. However I want to check its version but not sure how to do so.
There is nothing in the READ.ME file of that npm repo.
Please help.
Thanks.
The version is exported in index.js:
exports.version = require('../../package').version;
So you can get it by requiring the module and accessing the version property:
var mongo = require('mongodb');
var version = mongo.version;
console.log(version);
According to the npm documentation you can get a list of npm packages and their corresponding versions using npm ls or npm ls -g (for global)
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