Hello!
I tried to use the ClipboardHelper as shown in the code sample, but the page does not load any more with following error:
java.lang.IllegalStateException: Couldn't find the definition of the element with tag 'clipboard-helper' in any template file declared using '@JsModule' annotations. Check the availability of the template files in your WAR file or provide alternative implementation of the method getTemplateContent() which should return an element representing the content of the template file
at com.vaadin.flow.component.polymertemplate.NpmTemplateParser.getTemplateContent(NpmTemplateParser.java:136)
at com.vaadin.flow.component.polymertemplate.TemplateDataAnalyzer.parseTemplate(TemplateDataAnalyzer.java:200)
at com.vaadin.flow.component.polymertemplate.TemplateInitializer.<init>(TemplateInitializer.java:91)
at com.vaadin.flow.component.polymertemplate.PolymerTemplate.<init>(PolymerTemplate.java:88)
at com.vaadin.flow.component.polymertemplate.PolymerTemplate.<init>(PolymerTemplate.java:103)
at org.vaadin.olli.ClipboardHelper.<init>(ClipboardHelper.java:29)
No, the latest version should work with npm mode. If you can create a small sample project that reproduces the issue, I can take a look once I find some time.
I noticed that I had a compile warning that my project was configured to use version 1.8 java system library, but that I had jdk 11 installed. I changed my project to use the version 11 java system library, and rebuilt my vaadin project. The warning went away, and happily the IllegalStateException I was getting with clipboard-helper has also gone away.