Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command failed with exit code ENOENT

I am new to Ionic and created a simple application. I have installed Android Sdk. And added these Environment Variable

I am trying to build my app using cordova build commandcommand but getting this error :-

Error: cmd: Command failed with exit code ENOENT

enter image description here I am been searching whole day for the solution and finally ended up here.

like image 732
Ghanshyam Singh Avatar asked May 28 '17 18:05

Ghanshyam Singh


People also ask

What is error command failed with exit code 1?

The AWS Glue job fails with the error "Command failed with exit code 1" and doesn't start. This error occurs when the AWS Glue IAM role doesn't have the required permission to access the AWS Glue ETL script from the Amazon S3 path.


2 Answers

For linux, you'll also need to add these lines in ~/.bashrc file

export ANDROID_HOME='/home/your_username/Android/Sdk'
export ANDROID_SDK_ROOT='/home/your_username/Android/Sdk'
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin

Then check if android target is read with cordova requirements first.

Reference for Mac OS:

https://gist.github.com/kristopherjohnson/7568583

like image 173
Udayraj Deshmukh Avatar answered Oct 06 '22 07:10

Udayraj Deshmukh


Command should be ionic platform add android and not cordova platform add android

like image 44
HarryJs Avatar answered Oct 06 '22 05:10

HarryJs