Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files are missing in boundled destination if import uses absolute paths #2275

Closed
mercmobily opened this issue Oct 21, 2016 · 10 comments
Closed

Comments

@mercmobily
Copy link

Description

Files are missing in boundled destination if import uses absolute paths

Versions & Environment

Polymer 0.16.0
Node 4.4.4
OS: Ubuntu

Steps to Reproduce

Clone the current PSK
Change my-app.html so that it has absolute paths:

<link rel="import" href="/bower_components/polymer/polymer.html">
<link rel="import" href="/bower_components/app-layout/app-drawer/app-drawer.html">
<link rel="import" href="/bower_components/app-layout/app-drawer-layout/app-drawer-layout.html">
<link rel="import" href="/bower_components/app-layout/app-header/app-header.html">
<link rel="import" href="/bower_components/app-layout/app-header-layout/app-header-layout.html">
<link rel="import" href="/bower_components/app-layout/app-scroll-effects/app-scroll-effects.html">
<link rel="import" href="/bower_components/app-layout/app-toolbar/app-toolbar.html">
<link rel="import" href="/bower_components/app-route/app-location.html">
<link rel="import" href="/bower_components/app-route/app-route.html">
<link rel="import" href="/bower_components/iron-pages/iron-pages.html">
<link rel="import" href="/bower_components/iron-selector/iron-selector.html">
<link rel="import" href="/bower_components/paper-icon-button/paper-icon-button.html">

Then run polymer build.

Expected Results

I expect the build to have the necessary result files

Actual Results

Files are missing. For example build/bundled only has my-icons.html and shared-styles.html

Please note that I have a rather large application, and was going insane with ../../../../../bower_components -- and an in the process of moving things around. So, absolute paths make my life 10000 times easier...

@mercmobily
Copy link
Author

Just a quick note: vulcanize works fine on my-main.html ...!

@FredKSchott
Copy link
Contributor

The new analyzer that we're currently merging into build will definitely make these errors easier to catch, but I don't know if it is set up yet to handle them correctly. Lets look at this first thing after we release with the new analyzer.

@mercmobily
Copy link
Author

Ok ta! When are you planning on merging? Is there a branch I can start
using, to see if it works?

On 27 Oct 2016 5:00 a.m., "Fred K. Schott" notifications@github.com wrote:

The new analyzer that we're currently merging into build will definitely
make these errors easier to catch, but I don't know if it is set up yet to
handle them correctly. Lets look at this first thing after we release with
the new analyzer.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Polymer/polymer-cli/issues/444#issuecomment-256475434,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACB7Xmr9q6jnxd9uuRYnQqSpUdIOAFvjks5q379egaJpZM4KcwdW
.

@FredKSchott
Copy link
Contributor

It's currently in a PR in polymer-build (Polymer/polymer-build#54). If you're up for some fiddling, you can download that from github and then npm link it into the CLI

@mercmobily
Copy link
Author

Tried that for a good hour and a half...
This is when I clone it/build it:

https://gist.github.com/mercmobily/deb81c22fd80fc8c6324fe060b73d46d

This is when I try to run it:

https://gist.github.com/mercmobily/4b20d70939e3cdfe1fee5a6140601b49

And... this is so that I can actually see what the warnings are!
Please note that this bug affects the straight PSK, all you have to do is change ../ into / for the link to bower components... I so want to see what the error messages are!

I even tried to compile the npm installed polymer-build so that I could apply the changes by hand... and failed (?!?)

https://gist.github.com/mercmobily/78fc350fcc1c2eecd3a3668666f84826

So... I guess I just wasn't meant to see these messages!

Merc.

@khammami
Copy link

khammami commented Dec 6, 2016

Hi everyone,

I'm having the same issue after updating polymer-cli to 0.17.0
the files I mentioned in polymer.json (shell & fragments) are missing only in bundled build

info:    Preparing build...
info:    Building application...
warn:    Unable to optimize .html file G:\git\conferences\web\index.html
{ err: {} }
info:    Generating build/unbundled...
info:    Generating build/bundled...
Ignoring duplicate element definition: custom-style
Ignoring duplicate element definition: dom-template
Ignoring duplicate element definition: dom-repeat
Ignoring duplicate element definition: array-selector
Ignoring duplicate element definition: dom-if
Ignoring duplicate element definition: dom-bind

@FredKSchott
Copy link
Contributor

See Polymer/polymer-build#83, we're currently working on a fix for this

@khammami
Copy link

khammami commented Dec 7, 2016

thanks @FredKSchott indeed it was related to absolute path but not in the entrypoint it was in shell: one of the import path inside the shell.

for this warning

warn:    Unable to optimize .html file G:\git\conferences\web\index.html
{ err: {} }

it was an ":" instead of "=" in html code but the analyzer didn't catch that just showed this "{ err: {} }" even with --verbose

@FredKSchott
Copy link
Contributor

Yea that's really annoying, lets try to get a fix in for those missing error messages with the next release

@justinfagnani
Copy link
Contributor

I think this is fixed with Polymer/polymer-build#83. Please reopen if it's still an issue.

@aomarks aomarks transferred this issue from Polymer/polymer-cli Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants