Wednesday, September 28, 2022

How to find version of an installed npm package

Use npm list for local packages or npm list -g for globally installed packages.


You can find the version of a specific package by passing its name as an argument. For example, npm list grunt will result in:


projectName@projectVersion /path/to/project/folder

└── grunt@0.4.1


Alternatively, you can just run npm list without passing a package name as an argument to see the versions of all your packages:


├─┬ cli-color@0.1.6

│ └── es5-ext@0.7.1

├── coffee-script@1.3.3

├── less@1.3.0

├─┬ sentry@0.1.2

│ ├── file@0.2.1

│ └── underscore@1.3.3

└── uglify-js@1.2.6


ou can also add --depth=0 argument to list installed packages without their dependencies


https://stackoverflow.com/questions/10972176/find-the-version-of-an-installed-npm-package

No comments:

Post a Comment