I cannot seem to get bower working on my current project. The project began as a yeoman 'angular' app a couple weeks ago, and now cannot remember exactly what I did, nor can I determine how to fix it.
I do not have a bower_components
directory, and have deleted and re-created bower.js
several times.
bower.json
{
"name": "my_name",
"version": "0.0.0",
"main": "app/index.html",
"license": "MIT",
"private": true
}
$ bower install jquery
bower jquery#* cached git://github.com/jquery/jquery.git#2.1.1
bower jquery#* validate 2.1.1 against git://github.com/jquery/jquery.git#*
bower jquery#* ENORESTARGET Tag/branch master does not exist
Additional error details:
No tags found in git://github.com/jquery/jquery.git
No branches found in git://github.com/jquery/jquery.git
It looks like this error is telling me that the jquery project doesn't have a master branch? (it does)
I created a fresh project, and did a bower init
, then ran the same command (bower install jquery
). Doing this works as expected, and jquery is installed without error.
$ bower install jquery
bower jquery#* cached git://github.com/jquery/jquery.git#2.1.1
bower jquery#* validate 2.1.1 against git://github.com/jquery/jquery.git#*
bower jquery#~2.1.1 install jquery#2.1.1
jquery#2.1.1 bower_components/jquery
I still cannot get my original project to work.
What is it that is causing this problem, and how can I resolve it?
UPDATE
I was able to resolve this issue by deleting all the hidden .git*
files.
- contents of
.git/
.gitignore
.gitattributes
I guess it follows that somehow git was caching something incorrectly? I'd really like to know what it was causing it to not work properly. I'll leave this question open for a bit in case someone has any insight as to what the cause of all this is. Otherwise I'll answer myself a bit later on...