Netbeans Cannot Find Cordova or Git on your path
Asked Answered
T

13

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 ?

Tallula answered 29/9, 2013 at 5:27 Comment(0)
G
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.

Goddart answered 29/9, 2013 at 13:0 Comment(0)
P
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.

Panteutonism answered 29/11, 2013 at 23:25 Comment(0)
L
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)

Lethia answered 3/10, 2013 at 13:31 Comment(0)
J
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 [email protected]

and restart Netbeans.

Jasminejason answered 8/10, 2013 at 9:20 Comment(0)
I
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

Irwin answered 6/1, 2014 at 10:51 Comment(0)
O
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

Osmund answered 19/8, 2014 at 20:49 Comment(0)
D
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.

Defeasible answered 16/7, 2016 at 23:26 Comment(1)
Same for me mate!Palmerpalmerston
I
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...!!!

Ianthe answered 7/2, 2014 at 15:28 Comment(5)
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!Podium
@Podium 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.Ianthe
@Podium 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...Ianthe
Thanks but I already checked everything https://mcmap.net/q/1630770/-ubuntu-linux-netbeans-cannot-detect-git-or-cordova-installed/738852Podium
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.Ditto
D
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.

Deanndeanna answered 18/4, 2014 at 9:1 Comment(0)
B
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.

Byroad answered 15/3, 2015 at 15:22 Comment(0)
K
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

Kindliness answered 8/9, 2015 at 21:55 Comment(0)
H
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 :)

Helminth answered 9/8, 2016 at 22:56 Comment(0)
T
0

in my case the problem was that git included in system path only. you have to include the path in user path , after including it everything work fine.

Tret answered 19/9, 2023 at 9:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.