PolymerElements / paper-card

A Material Design piece of paper with unique related data
https://www.webcomponents.org/element/PolymerElements/paper-card
98 stars 62 forks source link

After `polymer init` (create app), "Unable to find a suitable version for polymer" and then `"undefined" is not a valid custom element name` #106

Closed rjcorwin closed 7 years ago

rjcorwin commented 7 years ago

Description

Right now doing...

npm install -g polymer-cli
mkdir demo
cd demo
polymer init # pick option 2, the blank app
bower install paper-card # all unsuitable versions of polymer lead to the same error
vim src/demo-app/demo-app.html # Import paper-card and use it in the template
polymer serve # now you see "undefined" is not a valid custom element name" in browser console

Expected outcome

Expected to see a paper card.

Actual outcome

No paper card.

Browsers Affected

rjcorwin commented 7 years ago

The output on bower install paper-card...


Unable to find a suitable version for polymer, please choose one by typing one of the numbers below:
    1) polymer#master which resolved to 466624aef9 and is required by core-icons#337080bebd, core-iconset#5777a69331, core-iconset-svg#fffd00a52f, core-meta#f4cc4d5d90, paper-shadow#5a7de5ad0d
    2) polymer#^2.0.0 which resolved to 2.0.2 and is required by paper-card-demo
rjcorwin commented 7 years ago

Hm, I had better luck with bower install PolymerElements/paper-card. What is paper-card?

notwaldorf commented 7 years ago

Sorry, I am not sure I understand what you're running. Are you typing bower install paper-card or the CLI? That's definitely incorrect, and should be bower install PolymerElements/paper-card

rjcorwin commented 7 years ago

@notwaldorf Ya, I originally guessed that the paper-card package when installed from the bower CLI was going to be called paper-card, not PolymerElements/paper-card. PR sent to make this clear https://github.com/PolymerElements/paper-card/pull/107

Is there another way you are able to discover what package name these polymer-elements are published as?

notwaldorf commented 7 years ago

Assuming you got the element from https://www.webcomponents.org/element/PolymerElements/paper-card, there's a bower instruction on the left hand menu that says bower install --save PolymerElements/paper-card.

notwaldorf commented 7 years ago

Closing, as this was a problem with a non-polymer-team element by the same name