Polymer Template cannot be found when inside a dependecy
See original GitHub issueDescription of the bug
Polymer Template cannot be found as soon as it is part of a dependency. The reason for this might be my own fault f.e. maybe @HTMLImport
should not be used by addons?, or rather the lack of documentation for this very specific case. I would be really glad if somebody could help me out on this.
Minimal reproducible example
An example project can be found here to get the two behaviours:
- run an
install
goal on the parent module - execute
jetty:run
on the addon module the template is found - execute
jetty:run
on the demo module the template cannot be found
Expected behavior
The template should be found.
Actual behavior
java.lang.IllegalStateException: Can't find resource 'context://iron-dropdown-wrapper/iron-dropdown-animation.html' via the servlet context
at com.vaadin.flow.component.polymertemplate.DefaultTemplateParser.getTemplateContent(DefaultTemplateParser.java:104)
at com.vaadin.flow.component.polymertemplate.TemplateDataAnalyzer.parseTemplate(TemplateDataAnalyzer.java:185)
at com.vaadin.flow.component.polymertemplate.TemplateInitializer.<init>(TemplateInitializer.java:93)
at com.vaadin.flow.component.polymertemplate.PolymerTemplate.<init>(PolymerTemplate.java:97)
at com.vaadin.flow.component.polymertemplate.PolymerTemplate.<init>(PolymerTemplate.java:112)
at com.github.appreciated.dropdown.IronDropdownWrapper.<init>(IronDropdownWrapper.java:30)
at com.github.appreciated.dropdown.IronDropdownWrapper.<init>(IronDropdownWrapper.java:27)
at com.github.appreciated.MainView.getIronDropDown(MainView.java:54)
at com.github.appreciated.MainView.<init>(MainView.java:30)
... 48 more
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
dart - Missing Polymer Element - Stack Overflow
I checked the homepage on github. It looks to be five months old. How can I get it when it's available? Do I...
Read more >Data binding helper elements - Polymer Project
Polymer provides a set of custom elements to help with common data binding use cases: Template repeater ( dom-repeat ). Creates an instance...
Read more >Annotation Type HtmlImport - Vaadin
Defines HTML dependencies on a Component class. ... In order to use a Polymer template inside a component in Vaadin 14+, JsModule annotation...
Read more >Polymer 2 and TypeScript - Medium
Polymer can't be found for the extends . This is the most difficult of these errors to solve, because it is caused by...
Read more >Angular elements overview
The content is provided by the component's template, which uses Angular ... an Angular component, together with its dependencies, to a custom element....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think you need to define the
resourceBase
for the add-on module, see: https://github.com/vaadin/vaadin-grid-flow/blob/master/pom.xml#L123The tutorial https://vaadin.com/docs/v10/flow/web-components/creating-an-in-project-web-component.html describes how to make a component for a webapp project. There the files are put to the
/webapp/
folder. I actually don’t see any place where we mention that where you should put the files when you make an add-on that has local resources that should go to ajar
artifact.Maybe we should add documentation / tutorial for this, if this was the issue. Thus an issue for
vaadin/flow-and-components-documentation
repository would be great.