1

I am following this guide: https://github.com/PolymerLabs/start-polymer3. I am using Chrome and when I try to open the page it gives the error I wrote in the title of this question.

The Chrome debug console shows

Uncaught DOMException: Failed to execute 'define' 
   on 'CustomElementRegistry': this name has already been used with this registry    
    at http://127.0.0.1:8081/components/@polymer/paper-checkbox/node_modules/
        @polymer/polymer/lib/elements/dom-module.js:134:16

In case it matters, this is my Chrome version

Version 65.0.3325.181 (Official Build) (32-bit)

Jai
  • 74,255
  • 12
  • 74
  • 103
Jim C
  • 3,957
  • 25
  • 85
  • 162
  • At which step of the guide do you see that error? – tony19 May 01 '18 at 22:05
  • Don't know if it's the same thing, because I did not use Polymer 3, but in v2 this happened to me when I imported the same dependency twice by using different relative paths that resolved to the same absolute one. – mishu May 02 '18 at 05:21
  • BTW: you can see another question with a similar error message here: https://stackoverflow.com/q/46731888/521598 – mishu May 02 '18 at 07:40
  • @mishu, how can I use Chorme Debugger Network tab to check if there is a duplicated file? Well, I see several unresolved.js but I don't think this can be considered duplicated dependency. For instance: I see http://127.0.0.1:8081/node_modules/@polymer/iron-meta/node_modules/@polymer/polymer/lib/utils/unresolved.js and http://127.0.0.1:8081/node_modules/@polymer/iron-a11y-keys-behavior/node_modules/@polymer/polymer/lib/utils/unresolved.js – Jim C May 02 '18 at 14:04
  • @tony19, at very begging, after "Clone, install and serve the start-polymer3 project locally" I just polymer serve – Jim C May 02 '18 at 14:06
  • In the network tab you will see absolute URLs anyway I guess.. so it won't help if two separate relative import URLs resolved to the same absolute one.. I don't know how you can find those, if any other than some linux command to look for a pattern.. What you can do is to have a standard about how you import stuff and make sure all the files follow it.. – mishu May 02 '18 at 14:12
  • Templates are available from the polymer-cli now. Make sure your package.json have the right polymer versions: webcomponents 1.2.0 & polymer 3.0.0 pre.12 "pre.12 has bare modules" if you want I have a newer verson: github.com/busynest/website – Jack Markiewicz May 01 '18 at 22:46

1 Answers1

0

Check your Polymer CLI version with polymer --version. If it is not 1.7 try npm install -g polymer-cli@nextonce again. Then try polymer serve.

suksw
  • 1
  • 2