Errors installing Phonegap / Cordova - NodeJS

2
Your environment has been set up for using Node.js 0.12.6 (x64) and npm.

C:\Users\Alexandre>npm install -g phonegap
npm **WARN** addRemoteGit Error: not found: git

npm **WARN** addRemoteGit     at F (C:\Program Files\nodejs\node_modules\npm\node_mo
dules\which\which.js:72:28)

npm **WARN** addRemoteGit     at E (C:\Program Files\nodejs\node_modules\npm\node_mo
dules\which\which.js:75:29)
npm **WARN** addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modul
es\which\which.js:83:16

npm **WARN** addRemoteGit     at FSReqWrap.oncomplete (fs.js:95:15)

npm **WARN** addRemoteGit  git+https://github.com/imhotep/plugman.git#0.5.7 resettin
g remote C:\Users\Alexandre\AppData\Roaming\npm-cache\_git-remotes\https-github-
com-imhotep-plugman-git-20c32d58 because of error: { [Error: not found: git] cod
e: 'ENOGIT' }

npm **WARN** addRemoteGit Error: not found: git

npm **WARN** addRemoteGit     at F (C:\Program Files\nodejs\node_modules\npm\node_mo
dules\which\which.js:72:28)

npm **WARN** addRemoteGit     at E (C:\Program Files\nodejs\node_modules\npm\node_mo
dules\which\which.js:75:29)

npm **WARN** addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modul
es\which\which.js:83:16

npm **WARN** addRemoteGit     at FSReqWrap.oncomplete (fs.js:95:15)

npm **WARN** addRemoteGit  git+https://github.com/filmaj/node-plist.git resetting re
mote C:\Users\Alexandre\AppData\Roaming\npm-cache\_git-remotes\https-github-com-
filmaj-node-plist-git-653fe22e because of error: { [Error: not found: git] code:
 'ENOGIT' }

npm **ERR!** git clone --template=C:\Users\Alexandre\AppData\Roaming\npm-cache\_git-
remotes\_templates --mirror https://github.com/filmaj/node-plist.git C:\Users\Al
exandre\AppData\Roaming\npm-cache\_git-remotes\https-github-com-filmaj-node-plis
t-git-653fe22e: undefined

npm **ERR!** git clone --template=C:\Users\Alexandre\AppData\Roaming\npm-cache\_git-
remotes\_templates --mirror https://github.com/filmaj/node-plist.git C:\Users\Al
exandre\AppData\Roaming\npm-cache\_git-remotes\https-github-com-filmaj-node-plis
t-git-653fe22e: undefined

npm **ERR!** git clone --template=C:\Users\Alexandre\AppData\Roaming\npm-cache\_git-
remotes\_templates --mirror https://github.com/imhotep/plugman.git C:\Users\Alex
andre\AppData\Roaming\npm-cache\_git-remotes\https-github-com-imhotep-plugman-gi
t-20c32d58: undefined

npm **ERR!** git clone --template=C:\Users\Alexandre\AppData\Roaming\npm-cache\_git-
remotes\_templates --mirror https://github.com/imhotep/plugman.git C:\Users\Alex
andre\AppData\Roaming\npm-cache\_git-remotes\https-github-com-imhotep-plugman-gi
t-20c32d58: undefined

npm **ERR!** Windows_NT 6.1.7601

npm **ERR!** argv "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs
\node_modules\npm\bin\npm-cli.js" "install" "-g" "phonegap"

npm **ERR!** node v0.12.6

npm **ERR!** npm  v2.11.2

npm **ERR!** code ENOGIT

npm **ERR!** not found: git

npm **ERR!**

npm **ERR!** Failed using git.

npm **ERR!** This is most likely not a problem with npm itself.

npm **ERR!** Please check if you have git installed and in your PATH.

npm **ERR!** Please include the following file with any support request:

npm **ERR!**     C:\Users\Alexandre\npm-debug.log

At last, there is the log, what can it be?

    
asked by anonymous 05.07.2015 / 21:27

1 answer

2

The problem is that you probably do not have git installed in your environment, since git is not recognized with a command, since the log displays the following error message:

Error: not found: git

If it is installed, include it in the environment / user variables.

To solve this, please download for Windows and install it. After installation, when executing echo %PATH% at the command prompt you should see something in the output that contains the installation path, something like this:

C:\Program Files (x86)\git\cmd

If you have this in the output, it is likely that git will be recognized. To be sure, type git --version and the version of git should be printed. After that,% w /% will no longer display this error.

EDITION : including installation information about changing environment variable npm

When installing PATH , by default the first option is selecting, as below:

Noticethatitissaidthatwiththisoptiontheenvironmentvariablegitwillnotbechanged,soyouwillonlybeabletousebashandGUIinstalled(thatis,beingaccesseddirectly).

However,suchasnpm,someapplications/utilitiesrequirethatitberecognizedasacommand/application,whichmakesitnecessaryforPATHtobeupdated.Forthis,youshouldupdatethisvariableincludingthedirectorywhereitisPATH.

Forinformationonchangingthegit.exevariable,see Changing the PATH in Windows

    
05.07.2015 / 21:48