This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When trying to create Cordova project, IDE says it cannot find cordova or git. I can't tell which is missing, but both are on PATH. My PATH is (I put newlines here after semicolon to make it more readable, in real it is 1 line string): C:\Ruby200\bin; C:\windows\system32; C:\windows;C:\windows\System32\Wbem; C:\windows\System32\WindowsPowerShell\v1.0\; C:\Program Files\WIDCOMM\Bluetooth Software\; C:\Program Files\WIDCOMM\Bluetooth Software\syswow64; C:\Program Files (x86)\Java\jdk1.7.0_03\bin; C:\Program Files (x86)\Java\jdk1.7.0_03; C:\Program Files\Mercurial\; C:\Program Files\nodejs\; C:\Program Files (x86)\Git\cmd; C:\Users\vlriha\AppData\Roaming\npm In command line in Windows: $ where cordova C:\Users\vlriha\AppData\Roaming\npm\cordova C:\Users\vlriha\AppData\Roaming\npm\cordova.cmd $ where git C:\Program Files (x86)\Git\cmd\git.exe If I run in Java App following: Process process = Runtime.getRuntime().exec("cordova.cmd --version"); => returns "3.0.6" Process process = Runtime.getRuntime().exec("git.exe --version"); => returns "git version 1.8.3.msysgit.0" Product Version: NetBeans IDE Dev (Build web-main-11442-on-20130823) Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b55 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b40 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Created attachment 139122 [details] IDE log Here's ide log that contains some error related to cordova
Works for me on Windows 8
The error shows that nodejs is looking for cordova module in [netbeans]/bin/[node_modules], which it shouldn't. I've found some advises to set up env. variable NODE_PATH so that node will start looking for modules there but it didn't make any difference in my case: $ echo %NODE_PATH% C:\Users\vlriha\AppData\Roaming\npm\node_modules (this is where cordova module is), when I ran node from command line and prints paths: $ node > require("module").globalPaths [ 'C:\\Users\\vlriha\\AppData\\Roaming\\npm\\node_modules', 'C:\\Users\\vlriha\\.node_modules', 'C:\\Users\\vlriha\\.node_libraries', 'C:\\Program Files\\lib\\node' ] > module.paths [ 'C:\\Users\\vlriha\\repl\\node_modules', 'C:\\Users\\vlriha\\node_modules', 'C:\\Users\\node_modules', 'C:\\node_modules' ] it shows that hte NODE_PATH is registered...
I'm really confused, I've tried the same on Windows 8 and I have the same problem. But I'm 100% sure I've tested it on Windows 7 when it was in cordova branch...
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
Changeset: e06d0f7c2e5f Author: Jan Becicka <jbecicka@netbeans.org> Date: 2013-08-26 09:47 Message:
Finally reproduced on Windows XP and fixed (at least on my machine)
Thank you, verified Product Version: NetBeans IDE Dev (Build 201308280001) Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b55 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b40 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
i also have the same problem too.i am new to it and cannot find solution.
prabin, which version of the ide do you use?
(In reply to Jan Becicka from comment #10) > prabin, which version of the ide do you use? i use netbean ide version 7.4 rc1
please go to terminal and run git --version cordova --version what is the output of those commands?
(In reply to Jan Becicka from comment #12) > please go to terminal and run > git --version > cordova --version > > what is the output of those commands? cordova --version gives output 3.0.9 and git --version gives 'git is not recognized as external or internal command' I have installed git 1.8.4, do i have to to setup path for it in windows environment variable?
(In reply to prabin from comment #13) > (In reply to Jan Becicka from comment #12) > > please go to terminal and run > > git --version > > cordova --version > > > > what is the output of those commands? > cordova --version gives output 3.0.9 > and git --version gives 'git is not recognized as external or internal > command' > I have installed git 1.8.4, do i have to to setup path for it in windows > environment variable? again, in a git bash i tried command git --version: it gives output: git version 1.8.4.mysysgit.0
> > I have installed git 1.8.4, do i have to to setup path for it in windows > > environment variable? Yes. Exactly.
(In reply to Jan Becicka from comment #15) > > > I have installed git 1.8.4, do i have to to setup path for it in windows > > > environment variable? > > Yes. Exactly. Its working.Thanks for a help.
I'm on 7.4RC2 and Windows 8 and still am getting the error. C:\Users\justin> cordova -v 3.1.0-0.1.0 C:\Users\justin> git --version git version 1.8.4.msysgit.0 Here's my PATH: %SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem; C:\Program Files\TortoiseGit\bin; C:\Program Files\nodejs\; C:\Users\justin\AppData\Roaming\npm; C:\Program Files (x86)\Git\cmd C:\Users\justin> where git C:\Program Files (x86)\Git\cmd\git.exe C:\Users\justin> where cordova.cmd C:\Users\justin\AppData\Roaming\npm\cordova.cmd I've tried the hack that Vladimir suggested (adding @echo 3.0.1 into cordova.cmd), but that didn't work. Product Version: NetBeans IDE 7.4 RC2 (Build 201309252201) Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43 System: Windows 8 version 6.2 running on amd64; Cp1252; en_US (nb) User directory: C:\Users\justin\AppData\Roaming\NetBeans\7.4rc2 Cache directory: C:\Users\justin\AppData\Local\NetBeans\Cache\7.4rc2
onfire4g05, your problem is reported as issue 236730
I had the same problem. After upgrading git from 1.7.x to 1.8.4 it works on my machine.
I have Netbeans 7.4. + git version 1.8.5.2. + Cordova 3.3.0 Netbeans still cannot find path to both git and cordova. Please help?
Do the commands cordova -v and git --version return results for you? Also please check if you have the following locations in your path: For Cordova: C:\Users\<Your Name>\AppData\Roaming\npm For git: C:\Program Files (x86)\Git\cmd C:\Program Files (x86)\Git\bin Make sure that you check if the paths are correct. You can also try to reinstall Git entirely. When installing, make sure that you select to run Git from the command line in this step: http://uncod.in/images/msysgit6.png
Sure Thanks Marcoevich I had to do a couple more other steps though. I had to install node under xampp/htdocs plus the express modules http://www.youtube.com/watch?v=Q0HFBy2BtfA
Hi Ovayo, I'm glad you where able to solve it. I just want to note that normally you won't have to install node js or node packages directly into htdocs. If you have this line in your path: C:\Users\<Your Name>\AppData\Roaming\npm Then you can just install using 'npm install -g cordova' and 'npm install -g express'. This will give you acess to those packages wherever your project resides, and not just in that specific folder.
Great staff. Thanks
Can I start over again rather, so I can get acess to those packages wherever my project resides, and not just in that specific folder?
Yes you can. First remove Cordova and express with 'npm uninstall cordova' and 'npm uninstall express'. Then remove NodeJS. Secondly, install NodeJS again in it's standard location. Leave all settings as they are. Then, install Cordova. Do 'npm install -g cordova' (watch the -g!). Secondly, do 'npm install -g express'. Then, check your paths! Remove all instances that point to the previous location of Node and npm. Then, make sure your NEW NodeJS installation is available on your path: C:\Program Files\nodejs\ Secondly, make sure your NEW npm location is available on your path: C:\Users\<Your Name>\AppData\Roaming\npm Lastly, please try if you've done everything correctly. Open a new (!) commandline window, type "node", hit enter. Type "npm", hit enter. Type "cordova" and hit enter. (all without quotes ofcourse) If they all return results, you've installed it correctly. Good luck!
just add all those tools properly on your PATH. Thanks
I have the same problem... all PATH have been set, but still no luck Git Version : 1.9.0 msysgit.0 Cordova : 3.3.1-0.4.2 what should i do now? please help Product Version: NetBeans IDE 7.4 (Build 201310111528) Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 2 Java: 1.7.0_21; Java HotSpot(TM) Client VM 23.21-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11 System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb) User directory: C:\Users\Nur Ilham\AppData\Roaming\NetBeans\7.4 Cache directory: C:\Users\Nur Ilham\AppData\Local\NetBeans\Cache\7.4
Solved, thanks everyone
This is the results I get: ReferenceError: node is not defined ReferenceError: cordova is not defined Is this correct?
well i had the same problem and i resolved it. You have to install git, when you are installing git you have to change the PATH enviroment choose the option *Use Git and optional Unix tools from the windows Command Prompt. It results for me. http://www.youtube.com/watch?v=tlntE8fe6u4
i am facing the same issue, it shows cordova or git not in PATH. i have provided both to my PATH. $ git --version git version 2.5.3.windows.1 $ cordova --version 5.1.1 $ node --version v5.4.1 $ where git F:\Program Files\Git\bin\git.exe F:\Program Files\Git\mingw64\bin\git.exe $ where cordova C:\Users\eby\AppData\Roaming\npm\cordova C:\Users\eby\AppData\Roaming\npm\cordova.cmd $ where node F:\Program Files\nodejs\node.exe $