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.

Failed to execute 'define' on 'CustomElementRegistry'

See original GitHub issue

With both 14.0.5 and 15.0.0.alpha1 my app won’t load and throws this client exception:

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "dom-module" has already been used with this registry
    at eval (webpack-internal:///../node_modules/@axians/axians-app-layout/node_modules/@polymer/polymer/lib/elements/dom-module.js?babel-target=es6:181:16)

I’ve found https://github.com/Polymer/polymer/issues/5407 but I’m not sure how apply the workaround with Vaadin. Also, removing node_modules and package-lock.json isn’t helping!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

2reactions
mehdi-vaadincommented, Sep 18, 2019

According to your package-lock.json, @axians/axians-app-layout has a dependency on @polymer/polymer 3.3.0. If you don’t use it you should remove it.

    "@axians/axians-app-layout": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/@axians/axians-app-layout/-/axians-app-layout-1.0.0.tgz",
      "integrity": "sha512-/lK82SpmCyvWzwh+/odGXRQ+zDY7ephLVO9/So+LseJGiOAQfGIBffnVEMteYLVSumCs1XRvehrhJzhi9+QyIg==",
      "requires": {
        "@axians/axians-icon": "^1.0.0",
        "@polymer/iron-media-query": "^3.0.1",
        "@polymer/polymer": "^3.3.0",
        "@vaadin/vaadin-button": "^2.2.1",
        "@vaadin/vaadin-lumo-styles": "^1.5.0",
        "@vaadin/vaadin-tabs": "^3.0.4",
        "lit-element": "^2.1.0"
      },
0reactions
heruancommented, Sep 18, 2019

Yeah, downgrading to Polymer 3.0.0 fixed the issue. I’ll follow-up on #6009 to know when I can upgrade again! Thanks Mehdi!

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 >
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 >
Trix error: Uncaught DOMException ... (in my local Dev ...
Uncaught DOMException : Failed to execute 'define' on 'CustomElementRegistry': the name "trix-toolbar" has already been used with this registry.
Read more >
failed to execute 'define' on 'customelementregistry angular
ERROR DOMException : Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry. The calls to ...
Read more >
Multiple Custom element developed in angular element
... I try to use them in single html I get error "Failed to execute 'define' on 'CustomElementRegistry': this name has already been...
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