简体   繁体   中英

Issue installing bower on windows

I'm using Windows 7 64bit and I install Bower with

npm install -g bower

It seems to install correctly.

npm http GET https://registry.npmjs.org/amdefine
npm http 304 https://registry.npmjs.org/amdefine
C:\Program Files (x86)\Git\local\bower -> C:\Program Files (x86)\Git\local\node_
modules\bower\bin\bower
bower@1.3.3 C:\Program Files (x86)\Git\local\node_modules\bower
...

But bower is not working:

$bower
sh.exe": bower: command not found

$bower -v
sh.exe": bower: command not found

What could be wrong?

Same problem but for me I had to add the Path Environment Variable that pointed to the AppData/Roming/ folder. I have no idea why node.js would install npm in the Roming folder. If I didn't have hidden folders turned on we never would have found it.

C:\\Users\\me\\AppData\\Roaming\\npm;

Then npm works from Node.js command prompt, and bower works from GitBash.

检查C:\\Program Files (x86)\\Git\\local是否已添加到路径环境变量中。

检查你的节点版本,我在v0.10.15运行然后更新到v0.10.35并为我解决了这个问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM