Ionic cordova run android (native run issue)

when run this command “ionic cordova run android” i get
[ERROR] native-run was not found on your PATH. Please install it globally:
npm i -g native-run

i did install as required above but still get native-run was not found on your path. please help

i am using Windows 10.

here is my ionic info list:

Ionic:

Ionic CLI : 5.0.0
Ionic Framework : @ionic/angular 4.1.1
@angular-devkit/build-angular : 0.12.4
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.3.6
@ionic/angular-toolkit : 1.2.3

Capacitor:

Capacitor CLI : 1.0.0-beta.19
@capacitor/core : 1.0.0-beta.11

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 7.1.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 4 other plugins)

Utility:

cordova-res : not installed
native-run : 0.2.2

System:

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

1 Like

I encountered this problem as well, I chose to just reverted back to Ionic CLI version 4.12.0

2 Likes

In my case, went smooth after npm i -g native-run

@jusliong your answer fixed my problem, many many thanks :slight_smile:

1 Like

Thanks for your time but it didn’t help after running the suggested command of native-run.

@jusliong guess this is one way to fix someone else’s mistakes or backwards incompatibility. Thanks!

Just run
npm install -g native-run

Yep. We have technology. - Patrick Star

What is the difference between native-run and cordova run??

Apparently since Ionic 5.0.0 to run your app in a device requires a utility called native-run

It’s a “Utility for running native binaries on iOS and Android devices and simulators/emulators.”