I noticed that the builds on our CI started to fail because of the following error:
Discovered plugin \"cordova-plugin-app-version\" in config.xml. Adding it
I ran into this also. In my case, I needed to remove a problematic plugin cordova-plugin-camera-preview which lists "cordova": "*" as a dependency. This would install cordova 9.0.0 during ionic cordova build
cordova-plugin-camera-preview
"cordova": "*"
ionic cordova build