ionic-team / ionic-cli

The Ionic command-line interface
MIT License
2k stars 654 forks source link

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

Closed Mirodil closed 6 years ago

Mirodil commented 8 years ago

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 commented 8 years ago

it works for:

ionic run --debug -l -s android
jthoms1 commented 8 years ago

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

Mirodil commented 8 years ago

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`

******************************************************
NotBad4U commented 8 years ago

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

nigram commented 8 years ago

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

gregvis commented 8 years ago

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 commented 8 years ago

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

mtpultz commented 8 years ago

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

ionitron-bot[bot] commented 6 years ago

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!