How to show the latest version of an npm package
In this post we will give you information about How to show the latest version of an npm package. Hear we will give you detail about How to show the latest version of an npm packageAnd how to use it also give you demo for it if it is necessary.
we are going to learn about how to see the latest (remote) version of an npm packagein 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 express package.
4.17.1
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:
npm outdated
Output:
Package Current Wanted Latest Locationdate-fns 2.15.0 2.16.1 2.16.1 node-app
Hope this code and post will helped you for implement How to show the latest version of an npm package. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs