In this short tutorial you’ll learn how to check the version of any installed npm package including the ones
that have been installed globally using the -g flag.
Locally installed packages
To check the current versions of the npm packages for your project, you should navigate to the project directory
where your package.json is located and run the command npm list.
npm list
Here’s the structure of the output:
├── [email protected]
└── [email protected]
Global npm packages
To check the current version of the packages you’ve installed globally, you should add the -g flag.
npm list -g
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]