Thursday, November 19, 2015

Downgrading Cordova / Installing older Cordova version

Have you run into a situation where you upgraded Cordova and your application broke due to a third party plugin???
Here are the steps to install previous version of Cordova
  • cordova -v  would tell you the current version of cordova installed.
  • npm info cordova  would tell you the available versions of cordova in npm.
  • Suppose you want to install  v 5.3.3 then just follow the below commands
    • npm uninstall -g cordova  This will uninstall the current cordova verison
    • npm install -g cordova@5.3.3 This will install the version 5.3.3
  • Then you need to update your application to point to new cordova
    • cordova platform update android
    • cordova platform update ios
  • You can also update ionic as below
    • ionic lib update


Unknown said...

Hello! Thank you for this tip. I installed ionic and cordova via npm on an Ubuntu machine back in October of 2015 and built an android application. Once it was done I tried to build it on a Mac Mini in March 2016. I did not realize that the versions were so important. So I uninstalled cordova and ioinc via npm. I then installed the version for my android app that were working on the Ubuntu machine (cordova 5.4.1 and ionic 1.1.1 and used ngCordova 0.1.23). Thanks again!

Daniel Souza said...

Estava com o mesmo problema, foi só fazer o downgrade para a versão 7.0.1 que funcionou.
Valeu mesmo.