I have upgraded my SpringBoot webapp from Vaadin 23 to Vaadin 24. When running the application locally I received an error inside the browser.
Uncaught (in promise) DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "vaadin-checkbox" has already been used with this registry
at window.customElements.define (http://localhost:9092/?continue:6:829)
at http://localhost:9092/VAADIN/build/generated-flow-imports-fdb85f42.js:3297:125
Error points to
class ro extends S2(k(x(z))) {
static get is() {
return "vaadin-checkbox"
}
static get template() {
return y`
<div class="vaadin-checkbox-container">
<div part="checkbox" aria-hidden="true"></div>
<slot name="input"></slot>
<slot name="label"></slot>
</div>
<slot name="tooltip"></slot>
`
}
ready() {
super.ready(),
this._tooltipController = new K(this),
this.addController(this._tooltipController)
}
}
customElements.define(ro.is, ro);
Upon running vaadin:clean-frontend
, vaadin:prepared-frontend
and vaadin:build-frontend
the error stops occuring, however running mvn verify
will trigger the error again.
I have tried running mvn dependency:tree
and mvn dependency:analyze-duplicate
without success.
I attached my pom.xml in case it might help.