Polymer / polymer

Our original Web Component library.
https://polymer-library.polymer-project.org/
BSD 3-Clause "New" or "Revised" License
22.04k stars 2.01k forks source link

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "mwc-notched-outline" has already been used with this registry #5628

Closed boluwalade closed 4 years ago

boluwalade commented 4 years ago

Description

I created three custom elements using polymer/lit-element. I used some @material elements in my components. Using these my new created custom elements, I attempted to create another element but I keep getting the Uncaught DOMException error;

Steps to Reproduce

Example:

  1. Created my-element-one with @material components imports
  2. Created my-element-two with @material components imports
  3. Using my-element-one and my-element-two as imports, created my-element-three
  4. executed "polymer serve"

Expected Results

No error is throw

Actual Results

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "mwc-notched-outline" has already been used with this registry at legacyCustomElement (http://127.0.0.1:8000/node_modules/lit-element/lib/decorators.js:15:25) at http://127.0.0.1:8000/node_modules/lit-element/lib/decorators.js:48:104 at __decorate (http://127.0.0.1:8000/node_modules/tslib/tslib.es6.js:65:220) at http://127.0.0.1:8000/node_modules/@material/mwc-notched-outline/mwc-notched-outline.js:24:18

Browsers Affected

Versions

web-padawan commented 4 years ago

Hi, you submitted this to a wrong repository. You need material-components-web-components

Also, make sure that you use same version in your components. Material Web Components are 0.x and therefore you need to always use the same exact version.

arthurevans commented 4 years ago

Resolved over on the other repo: https://github.com/material-components/material-components-web-components/issues/862