After looking at a few threads here and a few issues on the Polymer GitHub repo, it looks like getting an error of
Uncaught HierarchyRequestError: Failed to execute 'appendChild' on 'Node': Nodes of type 'HTML' may not be inserted inside nodes of type '#document'.
after vulcanizing a polymer application is usually a sign that polymer.js is getting sourced more than once. However, I'm having a hard time figuring out whether that's true for my project.
I'm working on a project which uses a lot of custom components, and has a pretty long import hierarchy:
- foo-app
- foo-header
- foo-page-one
- foo-page-two
- foo-hero-unit
- foo-slideshow
- foo-footer
Each of these components imports polymer with a <link rel="import" href="../polymer/polymer.html"> -- however, vulcanize appears to be successfully eliminating multiple import (foo-hero-unit doesn't get imported twice), so I would expect polymer to only get imported once. I'm not sure how to confirm whether it is.
What should my next debugging steps be? I'm happy to provide more information, too, but since this is a closed source application, that does have some unfortunate limitations.
The full HTML of the file I'm vulcanizing is below.
Thanks,
Andrew Fallows
<!doctype html>
<html>
<head>
<meta
name="viewport"
content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>Project Foo</title>
<link rel="stylesheet" href="../assets/foo/base.css">
<script src="../assets/webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="../assets/foo-app/foo-app.html">
</head>
<body unresolved>
<foo-app></foo-app>
</body>
</html>