How to show the latest version of an npm package
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 versionThis above command prints the latest remote version of an express package.
4.17.1or you can also use the npm show command:
npm show express versionIf you want to see the current and latest versions of all npm packages that are present inside your package.json file, you can use:
npm outdatedOutput:
Package Current Wanted Latest Location
date-fns 2.15.0 2.16.1 2.16.1 node-app

