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 :(
Though it doesn't say it explicitly, it implies that Bower is deprecated. Existing projects that depend on package management via Bower will continue to work for the time being; but it's recommended that new projects should not take a dependency on Bower.
Bower lets you query the bower registry via the command line to find a package by a given name and then list its versions. e.g.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With