Skip to content

cordova not available when running on android with the -l flag #3720

@ionitron-bot

Description

@ionitron-bot

Bug Report

Ionic Info

$ ionic info
√ Gathering environment info - done!

Ionic:

   ionic (Ionic CLI)             : 4.2.1 (C:\Users\Toch\AppData\Roaming\nvm\v10.10.0\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.0.0-beta.13
   @angular-devkit/build-angular : 0.8.6
   @angular-devkit/schematics    : 0.8.6
   @angular/cli                  : 6.2.6
   @ionic/angular-toolkit        : 1.0.0

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : not available
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.0, (and 18 other plugins)

System:

   NodeJS : v10.10.0 (C:\Program Files\nodejs\node.exe)
   npm    : 6.4.1
   OS     : Windows 10

Describe the Bug
Whenever I try to run my ionic app with live-reloading enabled on my Android device (ionic cordova run android -l), None of my plugins work, and I get the warning message, Cordova not available. If I run the same command without the -l flag it runs fine, but one can imagine how frustrating development can be without live reloading

Steps to Reproduce
Steps to reproduce the behavior:

  1. create a new ionic app
  2. add the Android platform with some plugins
  3. run the command "ionic cordova run android -l"
  4. try to access any native feature
  5. See error

Expected Behavior
Cordova should be available when running on a real native device

Additional Context
I am using nvm to manage different versions of Node on my machine.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions