Unable to install plugins Cordova or add platform


#1

Hi guys,

I sincerely hope that I am not asking a question that has already been answered. I saw a question quite similar to mine, but they werent meeting the same roadblocks as I.
Im installing ionic for the first time in Windows 8 (I also tried in windows 7). The first thing I noticed is that I have “>” instead of “$” on my CLI. Secondly I get an error that plugins could not be installed. My third and most persistent issue is that I cannot get to “ionic add platform” I get the error that my version of cordova may be too old but i updated it and the issue persists.

I saw the advice to do this in another post.

$ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git

but kept getting the error that git is not intalled. I then did an npm install git , as well as downloaded the entire program eventually. Now when I run said command i get

ERROR: spawn ENOENT

I just want to create the app without the plugin error, and ionic add platform successfully. Please help.


#2

Download any of the git clients like sourcetree and try.


#3

i’m downloading it, but what should i try exactly?


#4

Open terminal of source tree. Navigate to your app folder and type
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git.
It will do.


#5

okay lovely… using source tree, typed the command but now im getting

sh: cordova: command not found


#6

i believe im missing a step?


#7

Have you installed cordova CLI? Install it using the command npm install -g cordova Hope you installed nodejs aleady.


#8

helloo thank so much for your help so far… i feel like im finally gaining some ground… I have installed cordova and so forth now.
I am now at the stage of adding android platform… at first i got an error to install ant which i succesfully did. now its giving me this error

ERROR: an error occurred while listing android targets


#9

I’ve done a google search on the issues and was advised to do this

Then you must create two system variables:
ANDROID_HOME with the c:\sdk\android value
ANT_HOME with the c:\tools\apache-ant value
Finally, you must modify the PATH variable and add those two to the end of the PATH’ value:
;%PATH%\tools;%ANT_HOME%\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools

this is my PATH variable now

C:\Users\Me\AppData\Roaming\npm;%ANT_HOME%\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools

but im still getting the same error an error ocurred while listing android targets


#10

Hi just wanted to say thank you so much for your help. Source Tree was basically the answer to all my problems. to anyone experiencing lots of problems setting up ionic like i was… use sourceTree rather than node.js.