Open dnhyde opened 7 years ago
are you running polymer serve
from the root of your app? it should be trying to load http://localhost:8081/bower_components/webcomponentsjs/webcomponents-lite.js
I believe. Polymer itself isn't handling HTML imports.
Hi, yes running polymer serve
from app root.
when i try to load http://localhost:8081/bower_components/webcomponentsjs/webcomponents-lite.js
I get:
Resource interpreted as Document but transferred with MIME type application/javascript: "http://localhost:8081/bower_components/webcomponentsjs/webcomponents-lite.js".
And I can actually see the RAW script on load, meaning the script is actually there but polymer cannot find/load it?
I just cloned the repository and did not modify anything, however I noticed that polymer serve
now redirects on http://localhost:8081/demo/
can't remember if the "demo
" endpoint was present in version 1.0.0 as well...
Anyone managed to replicate the error? (tried on chrome and safari)
1) Clone repository
2) run polymer serve
Seems so simple that I might be missing something evident, sorry if that is the case.
You should use webcomponents-loader.js instead of webcomponents-lite.js.
Hi, thanks but nothing changed. Cannot find webcomponents-loader.js
either.
I noticed that polymer serve
does not load the "bower_component" folder (tried also with the external Google OK Server for Chrome, thinking that not loading the folder was related to polymer serve
) but the folder "bower_components" is not there (not in "Sources" when inspecting the page), meaning loading the following will fail:
http://localhost:8081/bower_components/webcomponentsjs/webcomponents-lite.js
(I double checked that "bower_components" is in the root folder after running bower install
)
I tried to delete the "bower_component" entry from the example's bower.json
ignore section but got the same behaviour:
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
I am missing why the whole "bower_components" folder is not loaded or why webcomponents-lite.js
orwebcomponents-loader.js
are not loaded while some components e.g. iron-icons appear in "Sources" when inspecting the page.
You can look at this test repo that I created: https://github.com/Homa/polymer2-test
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Description
I was following the tutorial to create my first element, first try was with polymer-cli 1.0.0, and everything went fine. However after updating to polymer-cli 1.1.0 I get several resources non found (as a consequence Polymer not defined). I guess it may be related to how Polymer handles HTML Imports. I read as well that bower is still supported but marked as deprecated in favor of yarn + webpack, maybe this creates unexpected behaviours? I hope I'm not doing anything wrong I just followed the guide as I did using polymer-cli 1.0.0 hope this helps.
Versions & Environment
Steps to Reproduce
I just followed the tutorial, then launched with polymer serve (tried polymer build as well, but produces only the index.html no bower_components etc...)
Expected Results
Seeing my custom element. As it happened with polymer-cli v1.0.0
Actual Results
Errors thrown: