Open robdodson opened 8 years ago
encountered the same issue
I found same issue: 1)
$ polymer init application
$ polymer build
$ polymer serve build/bundled
2) Open the browser (e.g. Chrome) on http://localhost:8080/
3) Open the Developer Tools and see the GET http://localhost:8080/shared-bundle.html 404 (Not Found) And the generated index.html has this:
<!DOCTYPE html>
<html>
<head>
<link rel="import" href="shared-bundle.html">
<title>app-test</title>
...
I'm facing the same issue. Any one have a workaround yet?
Same problem here
Not saying this is a fix but by running, polymer build --fragment bower_components/polymer/polymer.html
I was able to get past this issue.
yeah i don' think i've seen this issue after creating a proper polymer.json
that lists a shell and fragments. ex: https://github.com/Polymer/app-drawer-template/blob/master/polymer.json
Seems like the polymer.json
would be the correct route to go. Would it make sense to include a base one in the polymer-cli init?
probably if the templates don't already. But it should also not cause an error if one is missing. I don't think it's required but @FredKSchott would know better :)
When i build i get this even after adding polymer.html to my polymer.json
{
"entrypoint": "index.html",
"shell": "src/forms-app/forms-app.html",
"fragments": [
"bower_components/polymer/polymer.html"
]
}
$ sudo polymer build
info: Building application...
info: Generating build/unbundled...
info: Generating build/bundled...
warn: Unable to uglify file /Users/Dale/Desktop/Development/test/forms-app/forms-app_test.html_script_0.js
warn: Unable to uglify file /Users/Dale/Desktop/Development/src/form/behaviors/element-model-generator.html_script_0.js
warn: Unable to uglify file /Users/Dale/Desktop/Development/bower_components/marked-element/demo/index.html_script_0.js
warn: Unable to uglify file /Users/Dale/Desktop/Development/bower_components/marked-element/test/marked-element.html_script_0.js
warn: Unable to uglify file /Users/Dale/Desktop/Development/bower_components/marked-element/test/marked-element.html_script_1.js
warn: Unable to uglify file /Users/Dale/Desktop/Development/bower_components/marked-element/test/marked-element.html_script_2.js
warn: Unable to uglify file /Users/Dale/Desktop/Development/bower_components/marked-element/test/marked-element.html_script_3.js
warn: Unable to uglify file /Users/Dale/Desktop/Development/bower_components/marked-element/test/marked-element.html_script_4.js
warn: Unable to uglify file /Users/Dale/Desktop/Development/bower_components/web-component-tester/data/index.html_script_0.js
warn: Unable to uglify file /Users/Dale/Desktop/Development/bower_components/web-component-tester/data/index.html_script_2.js
error: Promise rejection: Error: no resolver found for ../bower_components/polymer/polymer.html
error: Error: no resolver found for ../bower_components/polymer/polymer.html
at FileLoader.request (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/loader/file-loader.js:70:37)
at Analyzer.load (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:121:32)
at Analyzer._getDependencies (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:433:25)
at Analyzer._dependenciesLoadedFor (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:401:25)
at Analyzer._parseHTML (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:227:50)
at null._onTimeout (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:125:39)
at Timer.listOnTimeout (timers.js:92:15)
error: Promise rejection: Error: no resolver found for ../bower_components/polymer/polymer.html
error: Error: no resolver found for ../bower_components/polymer/polymer.html
at FileLoader.request (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/loader/file-loader.js:70:37)
at Analyzer.load (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:121:32)
at Analyzer._getDependencies (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:433:25)
at Analyzer._dependenciesLoadedFor (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:401:25)
at Analyzer._parseHTML (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:227:50)
at null._onTimeout (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:125:39)
at Timer.listOnTimeout (timers.js:92:15)
error: Promise rejection: Error: no resolver found for ../bower_components/polymer/polymer.html
error: Error: no resolver found for ../bower_components/polymer/polymer.html
at FileLoader.request (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/loader/file-loader.js:70:37)
at Analyzer.load (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:121:32)
at Analyzer._getDependencies (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:433:25)
at Analyzer._dependenciesLoadedFor (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:401:25)
at Analyzer._parseHTML (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:227:50)
at null._onTimeout (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:125:39)
at Timer.listOnTimeout (timers.js:92:15)
error: Promise rejection: Error: no resolver found for ../bower_components/polymer/polymer.html
error: Error: no resolver found for ../bower_components/polymer/polymer.html
at FileLoader.request (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/loader/file-loader.js:70:37)
at Analyzer.load (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:121:32)
at Analyzer._getDependencies (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:433:25)
at Analyzer._dependenciesLoadedFor (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:401:25)
at Analyzer._parseHTML (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:227:50)
at null._onTimeout (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:125:39)
at Timer.listOnTimeout (timers.js:92:15)
error: Promise rejection: Error: no resolver found for ../bower_components/polymer/polymer.html
error: Error: no resolver found for ../bower_components/polymer/polymer.html
at FileLoader.request (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/loader/file-loader.js:70:37)
at Analyzer.load (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:121:32)
at Analyzer._getDependencies (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:433:25)
at Analyzer._dependenciesLoadedFor (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:401:25)
at Analyzer._parseHTML (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:227:50)
at null._onTimeout (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:125:39)
at Timer.listOnTimeout (timers.js:92:15)
error: Promise rejection: Error: no resolver found for ../bower_components/polymer/polymer.html
error: Error: no resolver found for ../bower_components/polymer/polymer.html
at FileLoader.request (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/loader/file-loader.js:70:37)
at Analyzer.load (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:121:32)
at Analyzer._getDependencies (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:433:25)
at Analyzer._dependenciesLoadedFor (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:401:25)
at Analyzer._parseHTML (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:227:50)
at null._onTimeout (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:125:39)
at Timer.listOnTimeout (timers.js:92:15)
error: Promise rejection: Error: no resolver found for ../bower_components/polymer/polymer.html
error: Error: no resolver found for ../bower_components/polymer/polymer.html
at FileLoader.request (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/loader/file-loader.js:70:37)
at Analyzer.load (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:121:32)
at Analyzer._getDependencies (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:433:25)
at Analyzer._dependenciesLoadedFor (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:401:25)
at Analyzer._parseHTML (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:227:50)
at null._onTimeout (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:125:39)
at Timer.listOnTimeout (timers.js:92:15)
error: Promise rejection: Error: no resolver found for ../bower_components/polymer/polymer.html
error: Error: no resolver found for ../bower_components/polymer/polymer.html
at FileLoader.request (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/loader/file-loader.js:70:37)
at Analyzer.load (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:121:32)
at Analyzer._getDependencies (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:433:25)
at Analyzer._dependenciesLoadedFor (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:401:25)
at Analyzer._parseHTML (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:227:50)
at null._onTimeout (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:125:39)
at Timer.listOnTimeout (timers.js:92:15)
error: Promise rejection: Error: no resolver found for ../bower_components/polymer/polymer.html
error: Error: no resolver found for ../bower_components/polymer/polymer.html
at FileLoader.request (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/loader/file-loader.js:70:37)
at Analyzer.load (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:121:32)
at Analyzer._getDependencies (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:433:25)
at Analyzer._dependenciesLoadedFor (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:401:25)
at Analyzer._parseHTML (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:227:50)
at null._onTimeout (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:125:39)
at Timer.listOnTimeout (timers.js:92:15)
error: Promise rejection: Error: no resolver found for ../bower_components/polymer/polymer.html
error: Error: no resolver found for ../bower_components/polymer/polymer.html
at FileLoader.request (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/loader/file-loader.js:70:37)
at Analyzer.load (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:121:32)
at Analyzer._getDependencies (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:433:25)
at Analyzer._dependenciesLoadedFor (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:401:25)
at Analyzer._parseHTML (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:227:50)
at null._onTimeout (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:125:39)
at Timer.listOnTimeout (timers.js:92:15)
error: Promise rejection: Error: no resolver found for ../bower_components/polymer/polymer.html
error: Error: no resolver found for ../bower_components/polymer/polymer.html
at FileLoader.request (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/loader/file-loader.js:70:37)
at Analyzer.load (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:121:32)
at Analyzer._getDependencies (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:433:25)
at Analyzer._dependenciesLoadedFor (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:401:25)
at Analyzer._parseHTML (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:227:50)
at null._onTimeout (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:125:39)
at Timer.listOnTimeout (timers.js:92:15)
error: Promise rejection: Error: no resolver found for ../bower_components/polymer/polymer.html
error: Error: no resolver found for ../bower_components/polymer/polymer.html
at FileLoader.request (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/loader/file-loader.js:70:37)
at Analyzer.load (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:121:32)
at Analyzer._getDependencies (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:433:25)
at Analyzer._dependenciesLoadedFor (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:401:25)
at Analyzer._parseHTML (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:227:50)
at null._onTimeout (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:125:39)
at Timer.listOnTimeout (timers.js:92:15)
@dsnowdon you wouldn't add polymer.html
as a fragment. Fragments represent pages in your app. Take a look at https://github.com/Polymer/app-drawer-template for an example
@robdodson I was only able to get past issues with the build when i included polymer as well. It was trying to instantiate Polymer multiple times. I tried doing the following:
{
"entrypoint": "index.html",
"fragments": [
"src/app/pages/page1.html",
"src/app/pages/page2.html",
"src/app/pages/page3.html"
]
}
The result was Polymer trying to be instantiated multiple times. Adding the bower_components/polymer/polymer.html
to the fragments
fixed those errors for me.
@dsnowdon Can you post your polymer-cli
, node
, and OS versions?
So I can confirm that when a proper polymer.json exists, build/bundled
is built correctly without any missing shared-bundle.html
or 404 errors. When polymer CLI doesn't know the app-shell via the shell
flag/property it attempts to build a more generic shared-bundle.html
for the application, which is where this bug seems to exist. I'm still digging into why it isn't being created properly.
This explains why:
--shell
flagSo for now, the work around is to include the polymer.json
file / --shell
flag on build.
Thanks for looking into it @FredKSchott 🔍
What exactly is a 'proper' polymer.json, where can I get some more details?
edit:
@FredKSchott you mention the shell
flag/property but the Polymer-Build README doesn't have anything to say about it. What is it's role and what should it point to?
@pik check out https://developers.google.com/web/updates/2015/11/app-shell for more info on the app-shell pattern.
and more info on proper polymer.json: https://www.polymer-project.org/1.0/docs/tools/polymer-cli#build
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.
Running
polymer build --entrypoint index.html
against the PSK2 branch (https://github.com/PolymerElements/polymer-starter-kit/tree/psk2) generates a file with an import forshared-bundle.html
but it doesn't actually create ashared-bundle.html
file so I get a 404.