Ionic commands hangs


#1

Hi,
"ionic platform add" and “ionic build” command hangs at the last second.
But if I used “cordova platform add” and “cordova build” it works fine.

ionic platform add android ios” hangs at

Saving platform to package.json file
A platform already exists - now updating the entry: android android

ionic build” hangs at
** BUILD SUCCEEDED **

Anyone knows why?
I am thinking to use “cordova” commands instead of “ionic”. Any difference?


#2

@nirman99 A good deed needs no permission. Go for it :slight_smile:
Ionic builds on top of Cordova. Apache Cordova takes care of packaging your HTML5 app as a native app that can run in Android, iOS, and other platforms


#3

Problem is I use Jenkins to build the app. Because of ionic command hangs, build takes more than 30 minutes and sometimes fails. But if I used I cordova commands build takes less than 5 minutes. So, I am thinking to use
"cordova build" instated of “ionic build” but not sure if ionic does something additional to what cordova does.


#4

If it is really “at the last second” it could be caused by problems with telemetry. Here is how you can turn it off: https://ionicframework.com/docs/cli/telemetry/

In general ionic cordova commands “only” take the command and send it to cordova, but in the details it makes sure that the project is built before, that everything is setup up correctly etc - so using ionic cordova is preferred.