0
votes

I am trying to migrate to Polymer 1.0 and getting so many errors! I have followed the migration guide, and I think I got everything.

The first weird thing is that all the content loads twice, one copy above the other. All the JS on the page runs twice as well.

Another error I am getting is "Uncaught TypeError: t.log.split is not a function". Also lots of "[iron-icon::_updateIcon]: could not find iconset icons, did you import the iconset?" even though I have definitely imported iron-icons before iron-iconset.

I know this question is way too general, but does anyone have a suggestion of how to debug these kinds of issues?

1
"Too general" is actually one of the reasons a question can be closed on this site. My general advice is to start removing things until you are able to isolate the problem, then either fix it, or post a specific question here if you're stuck. This page has some pretty good advice on that topic.Ajedi32
I would suggest what @Ajedi32 says already but since you have posted one specific error "could not find iconset icons, did you import the iconset?", please check if you have specifically imported iron-icons/iron-icons.html. In 0.5, if you import core-icon or paper-icon-button, they automatically imported iron-icons.html, but you have to import it specifically in 1.0Aravind
Actually I am getting the same issue too, [iron-icon::_updateIcon]: could not find iconset `social`, did you import the iconset?. I have all the imports that are necessary included in my head. I am using a Meteor project and trying to migrate to 1.0. If I find a solutions, I will let you know. Using the WebComponentsReady event before displaying the template did make the icon appear, but caused other issues. Happy migration..better start building the layout again from scratchMattijs
An easy way to migrate the layout @Mattijs is to import iron-flex-layout.html, and just make all your Polymer0.5 layout attributes into class names. The only differences I came across are "flex one" becomes "flex-1" and "layout vertical reverse" becomes "layout vertical-reverse"user11410

1 Answers

1
votes

Ah, you just have to import the html files in the right order:

<link rel="import" href="../bower_components/iron-iconset/iron-iconset.html">
<link rel="import" href="../bower_components/iron-icons/iron-icons.html">
<link rel="import" href="../bower_components/iron-icon/iron-icon.html">