-1

While trying to do a release using the following command:

code-push release-cordova myApp android

I'm getting the following error in the terminal:

Running "cordova prepare" command:
[Error] Unable to prepare project. Please ensure that this is a Cordova project and that platform "android" was added with "cordova platform add android"

Any one knows what might be wrong? The project is a cordova project created using the command:

cordova create myApp

And also has android platform added.

UPDATE : Running cordova prepare android --verbose returns the following output :

Executing "before_prepare" hook for all plugins. Searching PlatformJson files for differences between project vs. platform installed plugins No differences found between project and android platform. Continuing... Generating config.xml from defaults for platform "android" Wrote out Android application name to "HelloCordova" Wrote out Android package name to "io.cordova.hellocordova" This app does not have launcher icons defined updated project successfully Executing "after_prepare" hook for all plugins.

iJade
  • 23,144
  • 56
  • 154
  • 243

2 Answers2

0

Make sure your Nodejs is the last version. code-push-cli required "child_process"

Blue Deep
  • 1
  • 1
-1

That error indicates that the current working directory didn't represent the root of a Cordova project at the time that you ran the release-cordova command. Can you make sure that you CD into the directory that contains the www, platforms, plugins, etc. directories, and then run the release-cordova command? That should do the trick for you

Jonathan Carter
  • 1,029
  • 1
  • 9
  • 17