When installing PhoneGap with node.js, I get the above error. I running the Node.js command prompt as Admin. Here is the full list of errors from the log:
370 error not found: git
371 error Failed using git.
371 error This is most likely not a problem with npm itself.
371 error Please check if you have git installed and in your PATH.
372 error System Windows_NT 6.2.9200
373 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "phonegap"
374 error cwd C:\Windows\System32
375 error node -v v0.10.28
376 error npm -v 1.4.9
377 error code ENOGIT
378 verbose exit [ 1, true ]
I have added my path to git.exe to the nodevars.bat file and when I type 'git' in the node.js cmd screen, I get the useage response (proving that git is in the path).
This is a brand new machine, so I'm probably overlooking something, but I can't quite figure out what.
Edit: more info - I'm using Windows 8.1 and I am using the "Node.js command prompt" (the title on the window). I'm following the instructions from here: http://phonegap.com/install/
When I type git at the prompt I get:
C:\Windows\System32>git
usage: git [--version] [--help] [-c name=value]
[--exec-path[=]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=] [--work-tree=] [--namespace=]
[]
After rebooting and trying other thing, it just seemed that some part of the npm script wasn't finding git. I opened the Git Shell and ran the command from there. It installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With