/ Node.js

How to find the version of an installed npm package?

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.

Tamas Piros

Tamas Piros

Tamas is a full stack web developer turned technical trainer who has a decade of experience working with prestigious organisations and has delivered training classes all over the world.

Read More