Reputation: 349
C:\Users\Saurabh\demo\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
ERROR running one or more of the platforms:
Error: C:\Users\Saurabh\demo\platforms\android\cordova\run.bat:
Command failed with exit code 1
You may not have the required environment or OS to run this project.
However, when I emulate same app it is running without any issue. My environment info are as follows-
PS: I have already tried to remove and add platform.
https://i.sstatic.net/YEro9.png
Upvotes: 2
Views: 1125
Reputation: 6063
I think you don't have set properly Environment Variable on windows , For example
Java JDK
create an environment variable for JAVA_HOME pointing to the root folder where the Java JDK was installed. So, if you installed the JDK into C:\Program Files\Java\jdk7, set JAVA_HOME to be this path. After that, add the JDK's bin directory to the PATH variable as well. Following the previous assumption, this should be either %JAVA_HOME%\bin or the full path C:\Program Files\Java\jdk7\bin
Apache Ant
you'd want to add this to your PATH: C:\apache-ant-1.9.2\bin
Android SDK
Cordova requires the ANDROID_HOME environment variable to be set. This should point to the [ANDROID_SDK_DIR]\android-sdk directory (for example c:\android\android-sdk). Next, update your PATH to include the tools/ and platform-tools/ folder in that folder. So, using ANDROID_HOME, you would add both %ANDROID_HOME%\tools and %ANDROID_HOME%\platform-tools
For more details go to here...
Upvotes: 2
Reputation: 4739
I think you don't have the npm module q
installed, install it like this (from the project root folder):
npm install q
Add --save
to it to add it to the dependencies in package.json
Upvotes: 0