googlearchive / polymer-tutorial

Deprecated Polymer 0.5 tutorial app
211 stars 125 forks source link

undefined is not a function #39

Open jmls opened 9 years ago

jmls commented 9 years ago

thought I'd try the tutorials, but can't get past #1 :(

When I include webcomponents.js, I get this message

undefined is not a function (webcomponents.js:30)

line 30 is : var parts = flags.log.split(",");

arthurevans commented 9 years ago

Do you have any code before importing webcomponents? You shouldn't be seeing this unless you're setting WebComponents.flags.log.

(Also can you add your browser, browser version and OS?)

jmls commented 9 years ago

aww, I do. I am using angular ... chrome Version 40.0.2214.91 (64-bit) ubuntu 14.10 3.16.0-29-generic #39-Ubuntu SMP Mon Dec 15 22:27:29 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

hope this helps

arthurevans commented 9 years ago

When you say, "I do" do you mean you have scripts before webcomponents.js? Or that you're setting WebComponents.flags.log?

And are you working through this Polymer tutorial (in which case Angular should not be involved) or are you doing a different tutorial?

jmls commented 9 years ago

Sorry for not being clearer. I have angular code after the webcomponents.js . I was using the tutorial for guidance on how to implement polymer (I wanted to use the ui from polymer in my angular app)

Are the two incompatible ?

arthurevans commented 9 years ago

Gotcha. I know people have used Angular and Polymer together. I don't have any experience with it myself. You might take a look over here as a starting point:

https://gabiaxel.github.io/ng-polymer-elements/

(I haven't tested this, so YMMV, but might serve as a starting point for using Polymer with Angular.)

AnothrNmbr commented 9 years ago

I have the same problem (webcomponents.js line 30) but do not have any code before importing webcomponents.js. I am not explicitly setting WebComponents.flags.log. Running Win7 64-bit with chrome Version 40.0.2214.115 m. That said, my polymer components on page appear to be working fine.

rdrey commented 9 years ago

I got this because I was importing a non-existent (custom) polymer component. But my setup is pretty crazy (Meteor.js + differential:vulcanize + Polymer), so no idea whether that's your issue, too.

s-a commented 9 years ago

Same problem here :( I am not using tutorials. I have installed webcomponents.js via bower. Using // @version 0.5.5

The problem is that flags.log is type object instead of array. So there does not exists a method called split()

It seems that this is fixed at https://github.com/webcomponents/webcomponentsjs/blob/master/webcomponents.js#L37 but I can not see any version informations there. And I hope this is the correct repository ^^.

https://github.com/webcomponents/webcomponentsjs/commit/bc7afc1f1fc8811247eaaa1eb0309c46f2360e47 Fix error calling .split on undefined.

robdodson commented 9 years ago

Looks like it's fixed but hasn't been released yet. @garlicnation is that correct?

On Sat, Mar 7, 2015 at 12:30 AM, Stephan Ahlf notifications@github.com wrote:

Same problem here :( I am not using tutorials. I have installed webcomponents.js via bower. Using // @version https://github.com/version 0.5.5

The problem is that flags.log is type object instead of array. So there does not exists a method called split()

It seems that this is fixed at https://github.com/webcomponents/webcomponentsjs/blob/master/webcomponents.js#L37 but I can not see any version informations there. And I hope this is the correct repository ^^.

webcomponents/webcomponentsjs@bc7afc1 https://github.com/webcomponents/webcomponentsjs/commit/bc7afc1f1fc8811247eaaa1eb0309c46f2360e47 Fix error calling .split on undefined.

— Reply to this email directly or view it on GitHub https://github.com/Polymer/polymer-tutorial/issues/39#issuecomment-77679453 .

AnothrNmbr commented 9 years ago

I got this error message to go away by pulling out the , , and tags as well as removing the Githubissues.

  • Githubissues is a development platform for aggregating issues.