bower error on Windows: Bower: ENOGIT Git is not installed or not in the PATH


problem:
running bower works OK, until you try to install something:

bower init
[ok]

bower install jquery --save
Bower: ENOGIT Git is not installed or not in the PATH

solution:
add the path to git, to the PATH environment variable.
note: bizarrely, on 2 machines (Win 8.1, Win 10) this required using %PROGRAMFILE(x86)% rather than the absolute path - maybe the PATH needs to have no spaces ...

from the command line / or in a BAT file:
SET PATH=%PATH%;%PROGRAMFILES(x86)%\Git\bin;%PROGRAMFILES(x86)%\Git\cmd;

OR value to append to the environment variable in system settings:
;%PROGRAMFILES(x86)%\Git\bin;%PROGRAMFILES(x86)%\Git\cmd;

IMHO this should really be setup as part of the Git install ...

Comments