GoogleWebComponents / google-map

Google Maps web components

Home Page:https://elements.polymer-project.org/elements/google-map

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot install through bower

karlpvoss opened this issue · comments

Bower fails to install when the main property has more than one type of file, this has three html files in the main field.

What version of Bower are you using? I ran bower install GoogleWebComponents/google-map with the latest and there were no errors.

I'm currently using version 1.5.2 of bower, installed with npm.

From: http://bower.io/docs/creating-packages/#bowerjson
Main:
The entry-point files necessary to use your package. Only one file per filetype.

And here's the error in the cmd prompt:

bower EINVALID Failed to read C:\Users\Karl\AppData\Local\Temp\Karl-PC-Karl\bower\google-map-14272-AJusk4\bower.json

Additional error details:
The "main" field has to contain only 1 file per filetype; found multiple .html files: ["google-map.html","google-map-search.html","google-map-marker.html","google-map-directions.html"]

Fair enough. We'll fix that.

I'd still like to understand why I don't get this error and you do. Is there anything different in the way you're installing the element?

Many Polymer elements do not comply with "single main" guideline (iron-behavior, etc). We use multiple main entries in catalog to display docs for multiple files.
The bower error is puzzling, I use 1.5.2 without problems. Is there some kind of a strict bower mode where warnings become errors?

Yikes. I didn't realize that's the way the catalog worked :\ I'll revert c4dc240

I'm not sure. I'm definitely getting an EINVALID and the files aren't installed to the bower-components folder. I'm just calling bower install --save GoogleWebComponents/google-map in the directory of my project, nothing else.

Unless there's some setting I need to change in bower?

You are not alone: PolymerElements/iron-ajax#100
That guy fixed it by reinstalling bower. Could be some install weirdness, where you think you are running 1.5.2, but your are not.
I grepd bower source, and I can't find that error message.

Looking at bower CHANGELOG, multiple mains are tolerated.
https://github.com/bower/bower/blob/master/CHANGELOG.md
Could be a windows specific bug too.

Good luck.

Thanks, I'll try some reinstalls and ect.

Turns out I just had to do a reinstall of Node.js and npm, wasn't on the latest version, so bower was installing incorrectly. Thanks for your help!