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.

error when using as frontend module: name "mod-card" has already been used with this registry

See original GitHub issue

My Home Assistant version: 2021.12.8

My lovelace configuration method (GUI or yaml): yaml

What I am doing: configuring card-mod as frontend module

What I expected to happen: no errors

What happened instead: This error in browser, plus a corresponding log entry:

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "mod-card" has already been used with this registry
    at http://homeassistant:8123/hacsfiles/lovelace-card-mod/card-mod.js?hacstag=190927524311:6:10674

Minimal steps to reproduce:

  • Install card-mod 3.1.1 via HACS
  • edit configuration.yaml to load card-mod as frontend module
  • observe error message in browser console when reloading dashboard
# The least amount of code possible to reproduce my error
frontend:
  themes: !include_dir_merge_named themes/
  extra_module_url: /hacsfiles/lovelace-card-mod/card-mod.js
# End of code

Error messages from the browser console: Uncaught DOMException: Failed to execute ‘define’ on ‘CustomElementRegistry’: the name “mod-card” has already been used with this registry at http://homeassistant:8123/hacsfiles/lovelace-card-mod/card-mod.js?hacstag=190927524311:6:10674


By putting an X in the boxes ([]) below, I indicate that I:

  • Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).

  • Have made sure I am using the latest version of the plugin.

  • Have followed the troubleshooting steps of the “Common Problems” section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.

  • Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
thomaslovencommented, Feb 7, 2022

Should be gone now.

0reactions
shred86commented, May 22, 2022

Unfortunately still receiving this same exact error. This is with using a lovelace design by matt0707.

card-mod was installed through HACS. The only slight difference I see is:

frontend:
  extra_module_url:
    - /hacsfiles/lovelace-card-mod/card-mod.js

This is defined in include/themes.yaml instead of the configuration.yaml file, but as far as I know, that shouldn’t matter.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Do we remove the Lovelace resource entry when installing 3.1.0
@florianec florianec mentioned this issue on Feb 3. error when using as frontend module: name "mod-card" has already been used with this registry...
Read more >
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 >
Card-mod - Super-charge your themes! - Themes
Hi, I have this error in my logs. Logger: frontend.js.latest.202111090 Source: components/system_log/__init__.py:190 First occurred: 10:08 ...
Read more >
mergermarket/fastly-frontend/acuris - Terraform Registry
This module creates Fastly Frontend including some conditions, like: ... be prefixed with a hyphen onto the start of the domain name. used...
Read more >
The MERN stack tutorial - LogRocket Blog
Learn all about the MERN stack in this step-by-step guide on how to use it by developing a simple CRUD application from scratch....
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