In this quick tutorial I will show you how you can check all the available versions of NPM package.
While developing there inevitably comes a time in a developers life that when you update Plugin or Package and things just do not work. There are a number of reasons as why this happens. Maybe the new version of the plugin is no longer compatible with other plugins or the new version introduces some braking changes to the way you access the plugin.
Whatever the reason might be, now you need the previous version of the plugins but you don’t know which versions are available. If you take a look at the NPM website, it shows the latest version available. We can do that by running the
npm view command.
First you need to have npm installed on your machine. Fire up a terminal windows and type the following
npm view <package name> versions
<package name> is the name of the package.
Let’s view all the available versions for a cordova / phonegap plugin called the admob pro plugin, for that we do the following
npm view cordova-plugin-admobpro versions
This will give the following out put
Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\Users\prantik>npm view npm versions