How to update Phonegap Plugins - Updating PhoneGap Plugins at once easely






How to check if my plugins are all good?

When I installed Phonegap for the first time I really expected to have all the plugins fully updated, well, I was wrong, very wrong!
After spending a lot of time in forums looking for solutions, I decided to post this really cool trick on Kollox.com.


READY TO UPDATE ALL YOUR PLUGINS LIKE A MASTER?

1) Open your Windows Node.js command prompt.(Type node.js in the windows search).

2)Type the path where your project is located at, in this case 
C:\laragon\www\my-project\

3)In your command prompt, type this command:
npm install -g cordova-plugin-update

4)Now the magic! Type this in your command prompt:
cordova-plugin-update

This little utility will simply go through all your plugins and check if there are any new versions available.
All you have to do is type "1" to update to the latest version.

This is an example of what you should see in your command prompt:


Newer versions of `cordova-plugin-battery-status` are available (currently 1.1.2)
  1) 2.0.1
  2) 2.0.0
  3) 1.2.5
  4) 1.2.4
  5) 1.2.3
  6) 1.2.2
  7) 1.2.1
  8) 1.2.0
  9) Don't update
Install (1/2/3/4/5/6/7/8/9)? 1

Newer versions of `cordova-plugin-camera` are available (currently 2.1.1)
  1) 4.0.2
  2) 4.0.1
  3) 4.0.0
  4) 3.0.0
  5) 2.4.1
  6) 2.4.0
  7) 2.3.1
  8) 2.3.0
  9) 2.2.0
  10) Don't update
Install (1/2/3/4/5/6/7/8/9/1/0)? 1

Newer versions of `cordova-plugin-media-capture` are available (currently 1.2.0)
  1) 3.0.1
  2) 3.0.0
  3) 2.0.0
  4) 1.4.3
  5) 1.4.2
  6) 1.4.1
  7) 1.4.0
  8) 1.3.0
  9) Don't update
Install (1/2/3/4/5/6/7/8/9)? 1

A newer versions of `cordova-plugin-console` is available (currently 1.0.7)
  1) 1.1.0
  2) Don't update
Install (1/2)? 1

Newer versions of `cordova-plugin-contacts` are available (currently 2.0.1)
  1) 3.0.1
  2) 3.0.0
  3) 2.3.1
  4) 2.3.0
  5) 2.2.1
  6) 2.2.0
  7) 2.1.0
  8) Don't update
Install (1/2/3/4/5/6/7/8)? 1

Newer versions of `cordova-plugin-device` are available (currently 1.1.7)
  1) 2.0.1
  2) 2.0.0
  3) Don't update
Install (1/2/3)? 1

A newer versions of `cordova-plugin-device-motion` is available (currently 1.2.5)
  1) 2.0.0
  2) Don't update
Install (1/2)? 1

A newer versions of `cordova-plugin-device-orientation` is available (currently 1.0.7)
  1) 2.0.0
  2) Don't update
Install (1/2)? 1

Newer versions of `cordova-plugin-dialogs` are available (currently 1.2.1)
  1) 2.0.1
  2) 2.0.0
  3) 1.3.4
  4) 1.3.3
  5) 1.3.2
  6) 1.3.1
  7) 1.3.0
  8) Don't update
Install (1/2/3/4/5/6/7/8)? 1

Newer versions of `cordova-plugin-file-transfer` are available (currently 1.5.1)
  1) 1.7.1
  2) 1.7.0
  3) 1.6.3
  4) 1.6.2
  5) 1.6.1
  6) 1.6.0
  7) Don't update
Install (1/2/3/4/5/6/7)? 1



After days of suffering due to numerous bugs in my application, I realized that the basic installation of Phonegap only included very old versions of each plugin!

Please leave us a comment if this trick helped you.


Leave us a comment