How to find the version of an installed npm package?
• 1 min read
Older Article
This article was published 8 years ago. Some information may be outdated or no longer applicable.
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.