Ionic Pro: I just updated Ionic to prepare for Ionic Pro migration, now I'm forced to use "ionic cordova" CLI and my project is broken


#1
  • When building the platform with ionic cordova platform add android, getting plugin from specific git branches doesn’t work anymore, so I can’t install all plugins, resulting in a broken running app
  • Platform now default builds with target 26, even if target 22 is specified in XML, it was building 22 before (I need 22 max for reasons too long to explain here)
  • “ionic cordova run android” doesn’t detect active emulators anymore and launches android studio emulator.

(I may update this list after that)

ermmm… what I am supposed to do here ? And it’s not like I have a choce, I need Ionic services (deploy, etc…) so I have to make the update.


#2

Ionic Pro is a hosted and closed source service, so there is not much we, the community, can help you with, sorry. Check these:

You can - and should - contact support at http://ionicframework.com/support#support


#3

What CLI were you using before?
Why do you think you now have to use another one?
Are you building locally or via Ionic Pro?


#4

before I was using for example :

ionic platform add android --save

now I have to use

ionic cordova platform add android --save

and it doesn’t do the same thing apparently

(I need Ionic Pro because I need the deploy services, and since Ionic deploy is closing at the end of the year, I need to upgrade to Ionic Pro, and Ionic Pro requires that ionic cordova thing apparently)


#5

“That thing” is just the current version of the CLI. The command you were using just got updated.

What errors are you getting when exactly?

What is your ionic info output?
Add ionic cordova requirements as well pleaes.


#6

So, I managed to make it work finally… I will write those informations in case it can help other developpers.

first I deleted the package-lock.json as it contains outdated information.

By default, this new ionic cordova defaults cordova-android to 6.3.0, this creates compatibility problems, so I had to manually specify in package.json “cordova-android”: “6.2.3”, I have to specify it everytime I remove the platform since auto --save during platform remove with the new CLI removes this information.

after that, a shot of npm install will install the missing packages

after that, I had to manually download the archives of my plugins that would not download anymore for some reason, I unzipped them, put the folders into my project’s root, and reference them with plugin name=“myplugin” spec="./mypluginfolder" in config.xml and “myplugin”: “./mypluginfolder”, in package.json

after that I managed to install the platform correctly, I have it says target 25 during platform installation, hopefully this is a bug of the new CLI (great…) as it actually installs the correct target 22 platform.

after that a shot of ionic cordova run android --prod --debug (or release) detects the active emulators and correctly launches the app without errors (except for some ionic-cloud related stuff, I’ll dig into that in a moment)

what a ride. hopefully I didn’t miss any steps


#7

No, this is actually the current version of Cordova CLI that does that (and that Ionic CLI uses in the background). You seem to also have update cordova manually. This never happens automatically. If you install an older version of Cordova you also get a older cordova-android (although with its bugs, of course).

Create a new topic for that issue with a copy of the output please so we can look at it.


#8

I indeed have manually updated cordova in the process when I think about it, because I did by mistake an npm install -g ionic cordova since the new CLI is now ionic cordova, I thought I was installing the new ionic CLI, can be confusing.

sorry for the tone of my posts, an unstable project is hardly easy to deal with, thank you for the time you took to answer me.