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.

0.116.4 - Failed to resolve module specifier "card-tools/src/lit-element".

See original GitHub issue

My Home Assistant version: 0.116.4

My lovelace configuration method (GUI or yaml): GUI

What I am doing:

  • I installed the Javascript Module card-mod.js according to the description Lovelace Plugins
  • Then I changed the Entities Card Configuration in the Lovelace UI as follows:
type: entities
style: |
  .card-header .name { 
    color: red;
  }
entities:
  - entity: input_select.radio_station
  - entity: input_select.dlna_render
  - type: divider
  - entity: script.local_radio
title: Radio Stationen

What I expected to happen:

  • The title “Radio Stationen” be in red

What happened instead:

  • The title color remains black
  • The log (log level info) shows the following entry:
2020-10-27 13:57:08 ERROR (MainThread) [frontend.js.latest.202010012] https://homeassistant.local:8123/lovelace-prod/default_view:0:0 Uncaught TypeError: Failed to resolve module specifier "card-tools/src/lit-element". Relative references must start with either "/", "./", or "../".

Minimal steps to reproduce:

  • Update Home Assistant to version 0.116.4
  • Install card-mod-js according to the description
  • Create a new Entities Card in Lovelace with a title
# The least amount of code possible to reproduce my error
type: entities
style: |
  .card-header .name { 
    color: red;
  }
entities: []
title: Hallo World
# End of code

Error messages from the browser console: Uncaught TypeError: Failed to resolve module specifier "card-tools/src/lit-element". Relative references must start with either "/", "./", or "../". (default_view:1)


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

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

[X] Have made sure I am using the latest version of the plugin.

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

[X] 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 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
hyperantcommented, Nov 6, 2020

Had the same issue, make sure you get the correct card-mod.js file. The file I got was from src/card-mod.js

I then noticed there is a card-mod.js file in the root of the project, looked at the source code for that and noticed it was different. Updated my card-mod.js file to that one instead and it all just started to work.

https://github.com/thomasloven/lovelace-card-mod/blob/master/card-mod.js

0reactions
buenteadcommented, Nov 6, 2020

The solution of @hyperant fixes this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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