Recently I was tasked with upgrading a single Cordova plugin.
This seemed like a simple job which would give me a quick and easy insight into using Ionic and Cordova.
I was wrong.
I feel like I spent the best part of a week in the bowels of Cordova.
I ended up upgrading almost all of the plugins (and removing ones which were rolled up into cordova-android and cordova-ios).
Every time I restored the project (ionic cordova prepare) a different set of problems greeted me.
- Check you actually need the scripts in the /hooks folder
- Remove sections (not items) which begin 'cordova' from your package.json
- Ensure the versions in your package.json match those in config.xml
- Use the edit-config and config-file tags where needed instead of editing anything in /platforms or /plugins