chlorinejs / lein-bower

Leiningen plugin for managing Bower dependencies in Clojure projects
66 stars 13 forks source link

Failure to resolve dependency using shorthand endpoint #3

Closed jeluard closed 10 years ago

jeluard commented 10 years ago

I'm trying to resolve polymer/platform assets but this fails with bower ENOTFOUND Package polymer/platform=polymer/platform not found. It looks like polymer is using shorthand endpoint location as identifier.

Is that something that should be supported?

jeluard commented 10 years ago

Also note that bower search polymer returns some result while lein bower search polymer does not.

jeluard commented 10 years ago

As a workaround one can use polymer-platform as identifier.

myguidingstar-zz commented 10 years ago

Also note that bower search polymer returns some result while lein bower search polymer does not.

They return the same result in my Linux box. Which OS are your running?

jeluard commented 10 years ago

Mac OSX

myguidingstar-zz commented 10 years ago

I don't know how to reproduce this. I tried this:

lein bower install Polymer/platform

(with Polymer capitalized) and it succeeded.

jeluard commented 10 years ago

Some more info:

lein bower install Polymer/platform

does work.

But when I have :bower-dependencies [[Polymer/platform "0.1.4"]] in my project.clj lein bower install fails. Incidentally it also makes lein bower install Polymer/platform fail.

myguidingstar-zz commented 10 years ago

lein-bower was splitted from bodil's lein-npm and use some functions from that project. The one to mention: https://github.com/bodil/lein-npm/blob/master/src/leiningen/npm.clj#L36

jeluard commented 10 years ago

So shall a bug be opened there?

myguidingstar-zz commented 10 years ago

Hey, I don't know much about bower itseft. Can you paste here a working bower.json with such end-point?

jeluard commented 10 years ago

Well I discovered bower with your plugin. I don't have a bower.json file, never had one. I'm just following polymer instructions telling me to do bower install --save Polymer/platform and I'd like to replicate this in lein-bower.

So far using :bower-dependencies [[Polymer/platform "0.1.4"]] does not work but :bower-dependencies [[polymer-platform "0.1.4"]] does. (lein bower install --save Polymer/platform works fine.)

Maybe that's not intended to work?

myguidingstar-zz commented 10 years ago

I'm afraid not. Lein-bower just reads from your project.clj and creates a temporary bower.json file and call bower itseft. I hope the Readme is clear enough

jeluard commented 10 years ago

Ok, my bad, looks like bower.json does not support various syntaxes that bower install support and you have to use the registered name.

Thanks for the help!