Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry' (Polymer 2.0) [closed]

I'm facing this issue while running polymer init on polymer-cli.

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry'

like image 695
navnit kapadiya Avatar asked Jun 10 '17 09:06

navnit kapadiya


2 Answers

Possible reasons:
- Element name starts with uppercase alphabet
- Element name does not have a hyphen in it (Thanks to Margherita Lazzarini)

Long story:
I was working with polymer CLI and when I ran polymer init, among the series of options it asks me, one of them was Main element name for which I entered Polymer-test-element.

It was giving me this error : Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': "Polymer-test-element" is not a valid custom element name

The problem was I had used an uppercase alphabet in the declared element name. So when I replaced 'P' with 'p' it resolved the issue.

Hope this helps you :)

like image 88
Furqan Rahamath Avatar answered Nov 17 '22 05:11

Furqan Rahamath


Probably you have defined a Custom Element without a hypen (-) in its name. See this answer

like image 40
Margherita Lazzarini Avatar answered Nov 17 '22 07:11

Margherita Lazzarini