ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

Caught exception: undefined for `ionic run -l android` command

Open Mirodil opened this issue 10 years ago • 9 comments

I have ionic v1 project and ionic-cli@beta, it returns the following error:

>ionic run -l android
Caught exception:
 undefined

Mind letting us know? https://github.com/driftyco/ionic-cli/issues

Mirodil avatar Jun 11 '16 19:06 Mirodil

it works for:

ionic run --debug -l -s android

Mirodil avatar Jun 12 '16 21:06 Mirodil

Could you provide me with the output from ionic info from within your project directory? Thanks, this should help in troubleshooting.

jthoms1 avatar Jun 13 '16 16:06 jthoms1

here is it:

Your system information:

You have been opted out of telemetry. To change this, run: cordova telemetry on.
6.2.0

Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 1.3.1
Ionic CLI Version: 2.0.0-beta.30
Ionic App Lib Version: 2.0.0-beta.16
OS:
Node Version: v6.1.0


******************************************************
 Dependency warning - for the CLI to run correctly,
 it is highly recommended to install/upgrade the following:

 Please install your Cordova CLI to version  >=4.2.0 `npm install -g cordova`

******************************************************

Mirodil avatar Jun 13 '16 16:06 Mirodil

Same issue for me :(, my info is

Cordova CLI: 6.1.1 Gulp version: CLI version 3.9.1 Gulp local: Local version 3.9.1 Ionic Framework Version: 2.0.0-beta.8 Ionic CLI Version: 2.0.0-beta.30 Ionic App Lib Version: 2.0.0-beta.16 OS: Distributor ID: Ubuntu Description: Ubuntu 15.10 Node Version: v5.0.0

NotBad4U avatar Jun 14 '16 07:06 NotBad4U

Same here

add to body class: platform-android ANDROID_HOME=/Users/magnus/Library/Android/sdk JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home No target specified, deploying to emulator

Error: No emulator images (avds) found.

  1. Download desired System Image by running: /Users/magnus/Library/Android/sdk/tools/android sdk
  2. Create an AVD by running: /Users/magnus/Library/Android/sdk/tools/android avd HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver

Caught exception: undefined

My info Gulp version: CLI version 3.9.1 Gulp local: Local version 3.9.1 Ionic Framework Version: 2.0.0-beta.8 Ionic CLI Version: 2.0.0-beta.30 Ionic App Lib Version: 2.0.0-beta.16 ios-deploy version: 1.7.0 ios-sim version: 5.0.6 OS: Mac OS X El Capitan Node Version: v4.4.4 Xcode version: Xcode 7.3.1 Build version 7D1014

nigram avatar Jun 14 '16 12:06 nigram

I am having this issue as well, I'm just trying to follow the Ionic 2 getting started tutorial, so i'm using the cutePuppyPics --v2 starter. ...How can we troubleshoot this ourselves since "undefined" doesn't really help?

My Info: Cordova CLI: 6.2.0 Gulp version: CLI version 3.9.1 Gulp local: Local version 3.9.1 Ionic Framework Version: 2.0.0-beta.10 Ionic CLI Version: 2.0.0-beta.32 Ionic App Lib Version: 2.0.0-beta.18 OS: Windows 8.1 Node Version: v4.4.5

gregvis avatar Jun 30 '16 15:06 gregvis

I was able to run this through the vscode debugger and this is where it is failing for me:

Running 'build:before' gulp task before build [15:22:17] Starting 'clean'... [15:22:17] Finished 'clean' after 34 ms [15:22:17] Starting 'build'... [15:22:17] Starting 'sass'... [15:22:17] Starting 'html'... [15:22:17] Starting 'fonts'... [15:22:17] Starting 'scripts'... [15:22:17] Finished 'html' after 70 ms [15:22:17] Finished 'scripts' after 70 ms [15:22:17] Finished 'fonts' after 87 ms [15:22:19] Finished 'sass' after 1.54 s Caught exception: RangeError: Maximum call stack size exceeded at String.match (native) at Object.exports.fromSource (cutePuppyPics\node_modules\convert-source-map\index.js:122:19) at DestroyableTransform.sourceMapInit as _transform at DestroyableTransform.Transform._read (cutePuppyPics\node_modules\through2\node_modules\readable-stream\lib_stream_transform.js:159:10) at DestroyableTransform.Transform._write (cutePuppyPics\node_modules\through2\node_modules\readable-stream\lib_stream_transform.js:147:83) at doWrite (cutePuppyPics\node_modules\through2\node_modules\readable-stream\lib_stream_writable.js:313:64) at writeOrBuffer (cutePuppyPics\node_modules\through2\node_modules\readable-stream\lib_stream_writable.js:302:5) at DestroyableTransform.Writable.write (cutePuppyPics\node_modules\through2\node_modules\readable-stream\lib_stream_writable.js:241:11) at write (cutePuppyPics\node_modules\vinyl-buffer\node_modules\readable-stream\lib_stream_readable.js:623:24) at flow (cutePuppyPics\node_modules\vinyl-buffer\node_modules\readable-stream\lib_stream_readable.js:632:7) Mind letting us know? https://github.com/driftyco/ionic-cli/issues

gregvis avatar Jun 30 '16 19:06 gregvis

I was able to get around this similar to @Mirodil, but without the flags using ionic run android

mtpultz avatar Aug 26 '16 22:08 mtpultz

Thanks for the issue! This issue appears to be associated with an old version of the Ionic CLI. Please update to the latest CLI version, which supports all versions of the Ionic Framework. If the issue is relevant and if it persists after updating to the latest CLI version, please create a new issue.

Thank you for using Ionic!

ionitron-bot[bot] avatar Jul 12 '18 16:07 ionitron-bot[bot]