flow: Failed to execute 'define' on 'CustomElementRegistry'

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!

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

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"
      },