-
Notifications
You must be signed in to change notification settings - Fork 201
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
Missing bower components after running polymer build #2215
Comments
How are you referencing moment? Third party dependencies are only pulled over if they are referenced so that the analyzer can see it. |
@justinfagnani |
@Momoumar can you update polymer-cli to latest (v0.14.0) and try again? This should be fixed in the latest version. Also, for index.html only we reccomend using the absolute URL path ie: |
@FredKSchott, I've updated to v0.14.0 but the issue is still present. |
@Momoumar and did you change to |
@FredKSchott, Yep I did but it remains. |
hmm, that's very strange. I still can't reproduce based on your steps in the OP. Can you run |
+1, i'm experiencing same issue, js-cookie and even webcomponent is not loaded to the workaround for now is running bower install on the build/bundled folder so firebase can pick it up. |
How are you referencing those files? |
This is reproducible with a freshly generated application template:
webcomponentsjs is missing in build/bundled/bower_components, in the browser you see: polymer-cli: 0.14.0 |
@antonmoiseev thanks for the clear steps, I can reproduce that. Not sure what's not working here, but for some reason our dependency analyzer is missing that "/bower_components/webcomponentsjs/webcomponents-lite.js" reference in your
But yea, we still need to figure out why this isn't working in the first place... |
@FredKSchott do you think it makes sense to add |
I have also been hit this issue. The --include-dependencies flag workaround is a bit unworkable in my case due to the number of dependencies missing in /build/bundled Has there been any progress into understanding the reason for the problem? |
+1 It appears that all components which are not loaded from the html are not in the bower_components, true ? My components in the src folder load lot of components, these components aren't all copied to the bower_components folder. Same issue with the Currently we use a gulp task to copy the missing dependencies... |
I have experienced the same problem. I submitted a bug yesterday: Polymer/polymer#3882 It includes my steps to reproduce and what my polymer.json file looks like, showing the includeDependencies array. Upon 'polymer build' none of the dependencies are being included in the build folder. |
as of |
@FredKSchott also experiencing this bug. Although I may be experiencing something a little different. Steps to reproduce:
In src/ I am given one El named user-app. Open this el, inside Create a new el in src/ named "my-el" or whatever you want to call it. At the top do your html imports. Ex:
Go to index.html, change
Afterwards, Curiously I can solve the first problem by moving the import statement for iron-form into the user-app el, even though that el isn't the one that uses it at all, for some reason it then gets put in the build/bundled/bower_components directory. The second problem I can solve by just removing the import statement for polymer from my-el. Again though, I thought all polymer el's should import polymer, not just the base el? |
Just my 2c... are you sure this is not related to #444? (I have only just filed it) |
I also miss bower_components firebase files when I build.
polymer-cli version: 0.16.0 I moved temporarily my index.html code in to the |
Are your paths correct in Does it return "Build complete" at the end of the build? |
Thanks for all your feedback, everyone. We've been making a ton of improvements to the build process (new analyzer, more straightforward analysis, etc), which will be released in the next version. You can try a pre-release of the new build command with Most of these issues should be solved in this newer version. |
Thank you Frank!!!
…On 15 Dec 2016 9:23 a.m., "Fred K. Schott" ***@***.***> wrote:
Thanks for all your feedback, everyone. We've been making a ton of
improvements to the build process (new analyzer, more straightforward
analysis, etc), which will be released in the next version. You can try a
pre-release of the new build command with npm install -g ***@***.***
Most of these issues should be solved in this newer version.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/Polymer/polymer-cli/issues/347#issuecomment-267209329>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACB7XqebF310rh_CFAveMyfF93zxTz6iks5rIJaagaJpZM4JeW4Q>
.
|
@FredKSchott Edit the build directories do not include the Relevant part of polymer.json (using polymer-cli@next):
|
@jifalops hmm that's not right. I just ran on |
@FredKSchott - i'm having the same issue after following all of the above including creating a new directory and running |
In case this helps anyone, just ran into the same problem as noted many times above. In my case it was caused by thinking "bower install --save" was all that was required. Fixed the problem by including the page that referenced the missing dependency in the polymer.json file like so. |
Edit It seems all of the missing dependencies are explicit imports in my app-shell. testing and reporting back... (see next comment for results) Building polymer-starter-kit example does work, but there are two inconsistencies I'm experiencing using the polymer init (application) and my own project.
|
Edit: See solution in later comment Edit I am using Polymer 1.7.1. I said in an earlier comment I was using polymer#next, I switched back before this little experiment. Shell path, HTML imports. Result
So if the app-shell file defined in polymer.json is "/src/app.html", the HTML imports in app.html are not always included. If the shell file path is relative, then the HTML imports in the shell file must also be relative, but then the app.html file is missing in build/bundled. |
It appears that bower is using app-route from an older repository https://github.com/x-element/app-route instead of https://github.com/PolymerElements/app-route. The x-element missing three components, including app-location. I tried to force it using 'bower install https://github.com/PolymerElements/app-route.git', but it still download it from x-element. |
Update This is no longer required with #!/usr/bin/env bash
# "shell" must be a relative path in polymer.json. src/app-shell.html
# "fragments" must use an absolute path in polymer.json. /src/frag-mnt.html
# HTML imports must use relative paths inside the "shell" file.
# Tested with polymer-cli 0.17.0 and polymer 1.7.1.
polymer build
cp src/app-shell.html build/bundled/src/ # copy app shell
cp -rn bower_components build/bundled/ # copy only missing bower components |
After adding
to Very helpful in regards to firebase hosting and Windows IE/Edge! |
Any updates on this? I'm still facing same issue here... When using a behavior to load sensitive scripts like moment.js or some other components. |
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
Versions & Environment
Steps to Reproduce
polymer init application
bower install moment --save
polymer build
Expected Results
The moment.js library should be in build/bundled/bower_components
Actual Results
The moment.js library is not present in build/bundled/bower_components
The text was updated successfully, but these errors were encountered: