question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERROR DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name

See original GitHub issue

General 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:open
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
StfBauercommented, Mar 5, 2020

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.

1reaction
StfBauercommented, Mar 4, 2020

Can you please share an example repo?

Thank you.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found