In this tutorial, we are going to learn about how to see the latest (remote) version of an npm package in the command line.
If we run an
npm install package command, it will install the latest available version of an npm package, but after some time the package we installed is outdated and we need to see the latest version.
To see the latest version of an npm package before installing, we can use the following command:
npm view express version
This above command prints the latest remote version of an
or you can also use the
npm show command:
npm show express version
If you want to see the current and latest versions of all npm packages that are present inside your
package.json file, you can use:
Package Current Wanted Latest Location date-fns 2.15.0 2.16.1 2.16.1 node-app