0

I have just updated my polymer project ( bower update ) to switch to the new webcomponents.js library. However I get a: "Uncaught TypeError: undefined is not a function" on polymer.js:12

This is my index.html page:

<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Nautes Dashboard</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->

    <!-- build:css styles/main.css -->
    <link rel="stylesheet" href="styles/main.css">
    <!-- endbuild-->

    <!-- Place your HTML imports here -->
    <script src="bower_components/webcomponentsjs/webcomponents.js"></script>
    <link rel="import" href="elements/elements.html">

</head>
<body>

    <nautes-pass-dashboard>
    </nautes-pass-dashboard>

  <script>
    document.addEventListener('polymer-ready', function() {
        // Perform some behaviour
    });
  </script>
</body>

I have to switch back to the old import to make all work again:

<script src="bower_components/platform/platform.js"></script>

Did I do something wrong updating my project?

1
  • Did you try updating Polymer to 0.5 Commented Apr 16, 2015 at 11:50

1 Answer 1

1

If you still used platform.js I guess you used an old version of Polymer. My guess is that when you update to webcomponents.js, your kept the old version of Polymer, that isn't compatible with the webcomponents.js.

If my guess is right, you need to update all your Polymer setting, not only change platform.js with webcomponents.js. Take version 0.5.5 of Polymer and it should work better.

Sign up to request clarification or add additional context in comments.

1 Comment

thank you so much, indeed was a problem with the polymer version in my project. Doing bower update didn't upgraded the version of polymer installed. Now it's all working! :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.