Which Ionic CLI to use? 1.7.16 or 2.0.0.xxx beta?

Hi,

I am pretty confused at the moment…

I currently develop an app in Ionic V 1.3.1 and have been using Ionic CLI 1.7.16 and also installed crosswalk

When I run different Ionic commands it tells me to upgrade to V2.0.0 and now I tried this.

But suddenly I get different errors fx by using ionic lib command and now I cannot build.

Also it seems that crosswalk is taken out of the ionic CLI V2??

Which one is best to use while developing apps in Ionic 1.3.1?

Crosswalk was not taken out of the V2 CLI, but the browser command was removed, since it was no longer need.

You can add crosswalk with

ionic plugin add cordova-plugin-crosswalk-webview --save

The Ionic Lib command was removed as well since it was very problematic. You can now just use the raw bower/npm install commands

Thanks for the info about these changes! Recently I upgraded my CLI from 1.x to 2.x because I want to develop both Ionic 1 and Ionic 2 apps and the Ionic 2 CLI is backwards compatible with Ionic 1.

I ran into a few (minor) issues which however could all be worked around:

  1. I installed ionic 2 beta-32, beta 33 did not work for me at least with my nodejs version (v.4.2.6):
npm -d install -g ionic@2.0.0-beta.32
  1. To prevent “Error EACCESS” when running ‘ionic build android’ or ‘ionic run android’ (see: https://github.com/driftyco/ionic-cli/issues/375), I ran the command:
chmod -R +x hooks
  1. I use gulp in my build quite a lot (for SASS and for minifying etc) but with the Ionic 2 CLI I’ve stopped including the gulp “default” task in my ionic.project, I keep only the “watch” task.

So, in my ionic.project. I replace:

gulpStartupTasks": ["default", "watch"]

with:

gulpStartupTasks": ["watch"]

I then create a shell script to run ‘ionic serve’ for instance like this:

#!/bin/sh
gulp default
ionic serve --address 127.0.0.1 $*
  1. I ran into conflicts between the node/npm dependencies used by the Ionic 2 CLI and by the Karma test runner (see: stackoverflow.com/questions/35597719/log4js-and-winston-loggers-conflicting-when-trying-to-run-karma-from-ionic-cli).

To fix this, I modified my gulp.js file to include/require the karma nodejs module conditionally (only when it’s necessary: when running tests through karma).

So there’s nothing that can be worked around but figuring out some of the issues took quite some effort. Most of it is probably related to my specific project setup however.

And I ended up choosing nodejs v.4.2.6, other versions (both older and newer) caused various issues.

(and it almost goes without saying, do yourself a favor and use “nvm” to manage your node installations)

I am in a similar situation to your’s except I am still on Framework 1.2 (gotta change that soon–first attempt was not smooth so backed out—gotta love Time Machine ). I assume that you went ahead and updated your ionic with the “npm install -g ionic” command and then re-added the crosswalk-webview per @mhartington suggestion. Did you discover anything else? I use Cloud Deploy and Push and am on a tight deadline and don’t have the time to overcome new discoveries. Anything you, Mike, or anyone else can add would be appreciated. Thanks!