Welcome to Delicate template
Header
Just another WordPress site
Header

使用bower配置js时遇到错误

2月 19th, 2013 | Posted by 无 名 in nodejs

最近在使用nodejs,在使用bower配置bootstrap和jquery时遇到错误,bower是来自Twitter的强大的管理web包管理工具,

错误如下:

bower cloning git://github.com/twitter/bootstrap.git
bower cached git://github.com/twitter/bootstrap.git
bower fetching bootstrap
bower error status code of git: 127

用google顺藤摸瓜,看到解决方案如下。
下载安装github,下载地址:http://windows.github.com/
然后运行桌面的Git Shell
再执行: bower install bootstrap
再发现错误如下:

bower cloning git://github.com/twitter/bootstrap.git
bower cached git://github.com/twitter/bootstrap.git
bower fetching bootstrap
bower error status code of git: 128

There where errors, here's a summary of them:
- status code of git: 128
fatal: Not a git repository (or any of the parent directories): .git

原因是有缓存,进入C:\Users\\AppData\Roaming\cache ,会发现有bootstrap文件夹,删掉它,再执行bower install bootstrap
OK了。

参考资料:http://wingkaiwan.com/2012/11/25/bower-errors-on-windows/

You can follow any responses to this entry through the RSS 2.0 Both comments and pings are currently closed.