Reputation: 1402
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?
Upvotes: 0
Views: 835
Reputation: 1162
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.
Upvotes: 1