tools: Missing bower components after running polymer build
Description
Versions & Environment
- Polymer CLI: 0.13
- node: v4.4.7
- Operating System: Mac OSx 10.11.6
Steps to Reproduce
- Create an application project:
polymer init application - Install the moment.js [http://momentjs.com/] library for instance, using
bower install moment --save - Build:
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
About this issue
- Original URL
- State: open
- Created 8 years ago
- Comments: 33 (10 by maintainers)
Update This is no longer required with
polymer-cli@nextWell I found a process that works for me to solve the relative/absolute path conundrum I wondered into. Summed up a a shell script below.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.
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 polymer-cli@next.Most of these issues should be solved in this newer version.
@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
index.html. A workaround for now is to include it explicitly via the--include-dependenciesflag. As an example, this fixes the issue for me:But yea, we still need to figure out why this isn’t working in the first place…
This is reproducible with a freshly generated application template:
polymer init(choose application)polymer build --entrypoint index.html --shell src/myapp-app/myapp-app.htmlpolymer serve build/bundledwebcomponentsjs is missing in build/bundled/bower_components, in the browser you see:
polymer-cli: 0.14.0
+1, i’m experiencing same issue, js-cookie and even webcomponent is not loaded to the
/bower_components, yet it exist inbower.jsononbuild/bundled,workaround for now is running bower install on the build/bundled folder so firebase can pick it up.
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
"fragments": [ "src/my-about.html", "src/my-admnuser.html",like so. Fixed it immediately.
Thank you Frank!!!
On 15 Dec 2016 9:23 a.m., “Fred K. Schott” notifications@github.com wrote:
@FredKSchott do you think it makes sense to add
include-dependenciesto the polymer.json configuration? It may be useful for projects with dynamically loaded resources like in the shop app.