Search code examples
javascriptangularjsgitbowerbower-install

Bower install: No versions available


I successfully registered my own library into bower:

bower register angular-ngkit https://github.com/daveoncode/angular-ngkit-bower.git

and I'm able to install it using:

bower install angular-ngkit

But by using simply:

bower install

or

bower info angular-ngkit

I get "No versions available" exception and I don't understand why, since using

git tag

I can see my latest (and only) release named "0.2"

I previously published the library under the name "angular-ngkit" using another git repo and then I unregistered it (using curl -X DELETE repo_url) and re-registered with the new repo url and I also executed the command:

bower cache clean

...so why bower is not working as it should?

UPDATE:

if I define the dependency to my library in bower.json as "angular-ngkit": "*" I'm able to run bower install properly... but it's not acceptable :(


Solution

  • The reason that Bower does not see any versions of your package is that your repository contains only a single tag - v1.0 - which does not follow semantic versioning.
    Bower versions can be Git tags or branches. The version number must be a valid semantic version (semver).
    The reason that you manage to install using a star target ("angular-ngkit": "*") is that in this case if there are not valid tags, Bower will fallback to the latest commit on master.