🔥 NEW! Get my book The Developer's Guide to Having a Successful Blog
In this book I teach you all I know about starting and growing a blog.
Launch promo: 25% OFF until tomorrow! And a special challenge for you!
To see the latest version of all the npm package installed, including their dependencies:
❯ npm list /Users/flavio/dev/node/cowsay └─┬ email@example.com ├── firstname.lastname@example.org ├─┬ email@example.com │ ├── firstname.lastname@example.org │ └── email@example.com ├─┬ firstname.lastname@example.org │ ├── email@example.com │ └─┬ firstname.lastname@example.org │ └── email@example.com └── firstname.lastname@example.org
You can also just open the
package-lock.json file, but this involves some visual scanning.
npm list -g is the same, but for globally installed packages.
To get only your top-level packages (basically, the ones you told npm to install and you listed in the
npm list --depth=0:
❯ npm list --depth=0 /Users/flavio/dev/node/cowsay └── email@example.com
You can get the version of a specific package by specifying the name:
❯ npm list cowsay /Users/flavio/dev/node/cowsay └── firstname.lastname@example.org
This also works for dependencies of packages you installed:
❯ npm list minimist /Users/flavio/dev/node/cowsay └─┬ email@example.com └─┬ firstname.lastname@example.org └── email@example.com
If you want to see what’s the latest available version of the package on the npm repository, run
npm view [package_name] version:
❯ npm view cowsay version 1.3.1