I install nodejs, npm, then use this command to install bower:
npm install -g bower
npm bower -v
2.15.5
node -v
v4.4.5
However in my Git Bash, I can't run bower:
$ bower
module.js:327
throw err;
^
Error: Cannot find module 'C:\Program Files\Git\node_modules\bower\bin\bower'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:968:3
Things I have tried:
I have tried the solution from here by adding to PATH, but still no help. Any idea why it happened and how to solve it ?
Install bower locally:
npm install bower
.