6

I just install the latest netbeans 7.4 RC1 , i got the Error page "Netbeans Cannot Find Cordova or Git on your path, Please install Cordova or Git". In fact, i actually did install both cordova and Git.

I Do follow the step on this youtube ,

https://www.youtube.com/watch?v=Gt4uHSiO-00

but it is still not allow me to open any HTML 5 cordova project.

Is that any steps i left out ?

abc cba
  • 2,563
  • 11
  • 29
  • 50

12 Answers12

16

I had the exact same problem. I found this bug: https://netbeans.org/bugzilla/show_bug.cgi?id=234870

Go to the command prompt. Try typing:

git --version    
cordova --version

If you get a "command not found" error, you have an issue with your installation. More than likely you need the items added to your path variable. In my case, that was C:\Users\Chris\AppData\Local\GitHub\PortableGit_015aa71ef18c047ce8509ffb2f9e4bb0e3e73f13\bin;C:\Users\Chris\AppData\Roaming\npm

for both Cordova and Git.

mjk
  • 2,443
  • 4
  • 33
  • 33
3

I think the error message logic is broken, that's why this is misleading. In my case, git wasn't in the PATH, but cordova was. Making sure git was added to the PATH, fixed this.

Rolf Kaiser
  • 551
  • 6
  • 9
2

Had the same exact problem, looking here https://netbeans.org/bugzilla/show_bug.cgi?id=234870 this answer solved my problem:

On Windows, NetBeans tries to run "cordova.cmd -v" to check if Cordova is ready. So I modified this cordova.cmd file to simply return fake version:

@echo 3.0.1

this allows me to get through the wizard step, where is being checked if Cordova is installed. After that, I revert changes in cordova.cmd and finished new project wizard. And it worked and I can even build and start it on Android device. This "workaround" works until I close IDE. So the problem is only at the beginning in checking if Cordova is installed

On command line run

where cordova

to get where it is located (usually in C:\Users\\AppData\Roaming\npm)

maxidirienzo
  • 99
  • 1
  • 6
2

You have to use cordova version 3.0.10 instead of 3.1 Netbeans does not seem to work with Cordova 3.1

type in

npm install -g cordova@3.0.10

and restart Netbeans.

mdgeus
  • 372
  • 2
  • 8
1

Be sure to check if you have any enclosures in your environment variables. I made this mistake and it gave me a lot of headache :)

Not okay: "C:\Program Files\nodejs\";C:\Program Files (x86)\Git\bin

Okay: C:\Program Files\nodejs\;C:\Program Files (x86)\Git\bin

shrty
  • 404
  • 3
  • 6
1

If you install Netbeans 8 on Ubuntu 14.04, you should type

sudo ln -s /usr/bin/nodejs /usr/bin/node

then follow http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface

GMzo
  • 89
  • 1
  • 4
1

I had the almost the same problem using NetBeans 8.1 on Windows 7. Except NetBeans said Cordova (only) cannot be found on my PATH but Cordova was installed and on the PATH. So like everyone suggested, I tested the versions.

C:\>git --version
git version 2.7.0.windows.2

C:\>cordova --version
? May Cordova anonymously report usage statistics to improve the tool over time? No

You have been opted out of telemetry. To change this, run: cordova telemetry on.
6.2.0

Strange, the --version asked for user input which I gave. I reopened Netbeans to find it can now magically see the install of cordova. Come to find out my whole problem was that Netbeans couldn't see it installed because Cordova was forcing user input the first time cordova --version was ran. Cordova had been freshly installed and never ran.

Justin A
  • 364
  • 4
  • 14
0

If anyone is using Netbeans 8.0, this is the tutorial you need to follow provided on the website of Netbeans: https://netbeans.org/kb/docs/webclient/cordova-gettingstarted.html

Happy coding with cordova...!!!

Chintan Soni
  • 24,761
  • 25
  • 106
  • 174
  • I followed this guide on Ubuntu but I get the same error as above. Both git and cordova commands are in my path, I cannot understand what's wrong! – Maxxer Nov 16 '14 at 09:12
  • @Maxxer Okay you can try this way. Uninstall Git, and while installing Git just take care, when the screen comes with title "Adjusting your PATH environment", select second option "Use GIT from Windows Command Prompt", and proceed with installation, as usual. I did installation this way. – Chintan Soni Nov 17 '14 at 03:13
  • @Maxxer For windows, I followed this way. I am not aware of GIT installation with Ubuntu. I guess, you, too, should get a window like I got, during installation. Something relevant to setting PATH or variables, i guess... – Chintan Soni Nov 17 '14 at 03:17
  • Thanks but I already checked everything http://stackoverflow.com/q/26955747/738852 – Maxxer Nov 17 '14 at 07:23
  • following the link referenced does not solve this problem. In fact, that doc doesn't even mention setting a path variable for anything, at any place in it. – ppetree Nov 24 '15 at 19:19
0

I solved this problem with installing GIT from this link :

http://git-scm.com/book/en/Getting-Started-First-Time-Git-Setup

hope this help someone.

Mimouni
  • 3,564
  • 3
  • 28
  • 37
0

I had the same problem. I found the one solution on another site.
Try this: re-install git and choose the option *Use Git and optional Unix tools from the windows Command Prompt.

SedJ601
  • 12,173
  • 3
  • 41
  • 59
0
  1. Just follow the installation process as describe in phonegap(cordova) documentation but make sure when you are installing git you checked the option use git and optional Unix tools from the windows command prompt after that go to path variable check that C:\Program Files\nodejs\;C:\Program Files (x86)\Git\bin exists in your path environment variable as shrty has said. You can test if node.js is install by node --version and git by git --version

  2. Get the path where npm install -g cordova installed your
    cordova. It produces something like "} (current: {"node":"0.10.36","npm":"1.4.28"}) C:\Users\kanu\AppData\Roaming\npm\cordova ->: if you go in

C:\Users\kanu\AppData\Roaming\npm\ directory you'll find cordova.exe there What you have to do is to add ;C:\Users\magezi\AppData\Roaming\npm\ in environment after the git's one.

After that change the directory to where cordova.exe exists for me it was in C:\Users\kanu\AppData\Roaming\npm\ and from there you can test the installation of cordova by the command cordova --version(it will return the version)

open netbeans and try to create an cordova application. It should work

aidonsnous
  • 1,475
  • 4
  • 19
  • 41
0

I had the same issue under linux, and was tinkering around with the user specific $PATH. What solved it eventually was to set the $PATH variable in the netbeans.conf located at $NETBEANS_PATH/etc/netbeans.conf

I added these three lines

export ANDROID_HOME=/home/paul/Android/Sdk
PATH="$PATH:/home/paul/opt/node-v4.4.7-linux-x64/bin/:/home/paul/Android/Sdk/tools"
export PATH

Afterwards I was finally able to setup any Cordova project :)

Paul Würtz
  • 1,641
  • 3
  • 22
  • 35