Not being able to run bower in VS 2012

坚强是说给别人听的谎言 提交于 2019-11-30 19:04:14

问题


Since yesterday I have been trying to install and use bower for managing my dependencies. After going through many articles although I have been able to install it. I am not being able to run it. Beside many articles I also followed this video:

Bower running in Package Manager Console in Visual Studio install

As the video is in some other languages even though I followed all the commonds, I could not get

$env:path

After doing everything when I type bower in the Package manager console, it gives me error

Thanks in advance for helping me out.

PS: I have already installed npm and node.


回答1:


In order to use Bower correctly in Windows, you need to install msysgit correctly. This is the requirement as specified in bower github https://github.com/bower/bower#a-note-for-windows-users.

The option you have to select during installation is Run Git from the Windows Command Prompt.

After successful installation. Restart Visual Studio and then you are good to go.




回答2:


In my case, after installing msysgit, I installed bower using:

PM> Install-Package Bower

Above step automatically installed dependencies (node.js, jquery)

I also had to specify relative path to bower.cmd:

PM>.\MyProject.bin\bower.cmd install semantic-ui



来源:https://stackoverflow.com/questions/21175463/not-being-able-to-run-bower-in-vs-2012

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!