Cmd: Command Failed With Exit Code Enoent
Solution 1:
Please add C:\Windows\System32 in your PATH variable
Solution 2:
In a Windows environment:
If you have already installed cordova
, do the following:
npm uninstall cordova -g
ornpm uninstall -g cordova
- Delete folder
.cordova
- Right click your PC icon >> Properties
- Control Panel >> Advanced System Properties >> Environment Variables...
- Define C:\Windows\System32 as a System Variable(Bottom Window) ie SYSTEM_HOME
- Then define %SYSTEM_HOME% in the Server Variables (Top Window)
- BEFORE REINSTALLING
cordova
run the**** platform add android
command - THEN run
npm install -g cordova
ornpm install cordova -g
I've been working with ionic@beta
and the ...platform add ...
relies heavily on cordova
so it is recommended to add the platforms BEFORE initiating cordova
to minimize conflict.
Hope this helps.
****
= phonegap
or ionic
Solution 3:
Installation of CORDOVA
- Install node
- open CMD
- node -v for checking version installed
- npm -v for checking version installed
- Npm install -g cordova
- After Insatalling Android SDK
- Open SDK manager (Download API LEVEL 23 & 24 only)
Set the Environment Variables of Android SDK:- To add the SDK Tools to the PATH, open the Control Panel, click System and Security, click System, click Change settings, click the Advanced tab, then click the Environment Variables button.
In the list User variables select PATH and click the Edit button.
At the end of the field Variable value, add a semicolon followed by the path to the tools and platform-tools directores of the Android SDK install. Here is an example of what to add (note that there are two paths in one line, separated by a semicolon):
;C:\Users\anshu\AppData\Local\Android\android-sdk\tools;C:\Users\anshu\AppData\Local\Android\android-sdk\platform-tools
You can prepare the path in a text editor, copy it and paste at the end of the input field. Click the OK button when done. Click the OK button again to close the Environment Variables window.
Now test the install. Close any open command windows, open a new command window and type:
adb version This should display the version of the Android Debug Bridge.
- Navigate to C:>cd Nodespace\Android
- Type >>cordova create Test com.anshu.test Test
- Type >>cd Test
- Type >>cordova platform add android
- Type >>cordova compile android
After Connecting Android Device in Debugging Mode to Your System VIA USB
- Type>>cordova run
Solution 4:
C:\Users\VinexN207>cordova platform add android
Error: Current working directory isnot a Cordova-based project.
C:\Users\VinexN207>cd C:\Project\java_script\nShop
C:\Project\java_script\nShop>cordova platform add android
Error: Platform android already added.
C:\Project\java_script\nShop>cordova platforms ls
Installed platforms: android 5.1.1
Available platforms: amazon-fireos, blackberry10, browser, firefoxos, webos, win
dows, windows8, wp8
C:\Project\java_script\nShop>cordova platform add ios
WARNING: Applications for platform ios can not be built on this OS - win32.
Adding ios project...
iOS project created with cordova-ios@4.0.1
Installing "cordova-plugin-whitelist"for ios
C:\Project\java_script\nShop>cordova platforms ls
Installed platforms: android 5.1.1, ios 4.0.1
Available platforms: amazon-fireos, blackberry10, browser, firefoxos, webos, win
dows, windows8, wp8
C:\Project\java_script\nShop>
Yes, it works after adding path. Probably it works, because it doesn't write it Installed platforms: android-broken
.
Solution 5:
Try to follow these steps:
run
npm uninstall cordova -g
delete the folder
C:\Users\your-name.cordova
- reinstall the cordova: npm install cordova -g
go to the project folder and try again
cordova platform add android
Post a Comment for "Cmd: Command Failed With Exit Code Enoent"