How to check installed NodeJS driver version?

I have an old version of MongoDb (4.0.3) installed on a Mac that I’d like to upgrade. Checking the NodeJS guide for carrying that out, one of the prerequisites is that I should check on the compatibility of the driver before carrying out the upgrade itself.

What I’ve not been able to find though, is anything that tells me how to determine what the current driver version is. Is there a command for this I can use?

In order to check the installed version of NodeJS:
$ node -v

To verify the version of the installed libraries
$ npm list <LIB_NAME>
i.e.:
$ npm list mongodb
└── mongodb@4.5.0

Hope this information helps you

2 Likes

Thanks Ernesto,

I’ll give it a go a bit later once I’ve finished work.