How to find the version of an installed npm package?
This post is 4 years old. (Or older!) Code samples may not work,
screenshots may be missing and links could be broken. Although some
of the content may be relevant please take it with a pinch of salt.
When working with Node.js applications, we tend to install a vast amount of packages as dependencies and on top of this we can also have packages installed globally on our system.
The question is, how can we find which version of what package(s) we have installed either locally or globally.
There's a simple npm command that can return us the packages installed and we can use it in three ways:
to see the versions of globally intstalled packages we can execute npm list -g
to see all the package versions for the current project we can execute npm list
to see a specific package version for the current project we can execute npm list [package-name]
Either way, we'll get the appropriate package information returned.