Uncaught DOMException: CustomElementRegistry.define: 'custom-button' has already been defined as a custom element #4343
Unanswered
egor-progger
asked this question in
Q&A
Replies: 1 comment 2 replies
-
You're somehow getting two copies of the button definition in your page. Can you add a console log to the component definition module to check? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I try to create npm package with components which are based on lit, but in browser console see error: Uncaught DOMException: CustomElementRegistry.define: has already been defined as a custom element.
index.ts:
index.html:
Component is rendered but browser console is dislpaying:
Uncaught DOMException: CustomElementRegistry.define: 'custom-button' has already been defined as a custom element
If remove
const button = new Button;
from index.ts then component is not rendered and in browser console not display errorBeta Was this translation helpful? Give feedback.
All reactions