ERROR DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name
See original GitHub issueGeneral Information
- Usage
- [x ] Development
- Documentation
- Feature Request
Specific generator
- Addons
- HandlebarsJS
- [x ] Angular Elements
What Version you are running?
- NodeJS: 10.18.0
- NPM: 6.13.4
- @pnp/spfx: 1.12.0
Describe your problem
I created 2 components with angular elements using @ pnp / spfx, in the most current versions.
the components are working correctly, but when I add component 1 and then add component 2
The following message begins:
ERROR DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "app-wp-xxxx-xxxx-web-part" has already been used
if i add 2x the same component i have no error, only when i add different components.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Uncaught DOMException: Failed to execute 'define' on ...
this error is due to a custom element tag-name being registered which is already registered; to fix simply check that an element by...
Read more >Uncaught DOMException: Failed to execute 'define ... - GitHub
Blank page displayed and due to error: Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already ...
Read more >Failed to execute 'define' on 'CustomElementRegistry'
JavaScript error Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "ss3-force-full-width" has already ...
Read more >Adding custom javascript results in "Uncaught DOMException ...
Then, in the browser console I see "Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "trix-toolbar" has already been used ...
Read more >CustomElementRegistry.define() - Web APIs | MDN
Name for the new custom element. Note that custom element names must contain a hyphen. constructor. Constructor for the new 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 Free
Top 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

First, what is a component? Angular Elements Component or Web Part? is this issue raise by Angular Elements, SPFx, the scaffolding part? Can you please descript the exact steps so that it would be possible to reproduce this issue?
Sorry to be that picky but right now it is pretty hard for me to identify where the issue is.
Can you please share an example repo?
Thank you.