Custom element doesn't exist

I know this error has been mentioned more often, but in my case I cannot figure out why I get this.
At first there were no errors

When I look in the developer tools of chrome it get several errors like these:
Failed to load resource: the server responded with https://xxxxxxxx.duckdns.org:xxxxx/local/my-custom-card.jsa status of 404 (Not Found)
I am still running version 0.82.1. and i did not change the resource: they look

resources:
  - url: /local/my-custom-card.js
    type: js
  - url: /local/my-webfont.css
    type: css
  - url: /local/button-card.js
    type: module
  - url: /local/mini-media-player-bundle.js?v=0.9.8
    type: module # type: js

The lovelace ui still loads, but with errors. What do I miss

  • Did you put your files under the /www/ folder in the server?
  • Did you restart Home Assistant?
  • Are you sure you downloaded the raw files from Github?
  • Are you sure your config is put at the top of the ua-lovelace.yaml file right after the first title: ?
title: Curious
resources:
  - url: /local/my-custom-card.js
    type: js
  - url: /local/my-webfont.css
    type: css
  - url: /local/button-card.js
    type: module
  - url: /local/mini-media-player-bundle.js?v=0.9.8
    type: module # type: js

There is currently problems with the unpkg servers that many cards use to load litelement.

I’m in the same position. My Lovelace configuration had previously worked without issue; no changes have been made to it. In the last day or so, I’ve been seeing similar errors:

Do we have any indication of when unpkg will be back up?

Same problem!

I’ve updated the button-card.js with the latest version @kuuji provided, restarted HA but still getting the same issue. Everything was fine on monday evening.

I really don’t like that the card depends on the external resource. Is there a way to host lit-element locally on HASS?

you might need to delete cookies & website data and refresh a few times to kick it into gear.

1 Like

Thanks David. I’ve done that in Chrome on windows and now it’s working. My android device is another story. I’ve deleted the storage and site settings for my hass instance but i’m still getting the custom component error.

If I open an incognito tab on my mobile the interface works as expected. Therefore I know it’s not hass related any longer but am i missing something when clearing the cache om my mobile? Any tips are appreciated! :slight_smile:

FYI: A new version of button-card.js has been released. Works now again.
After replacing I had to clear cache and browsing history

I am confused,
You ask “Did you put your files under the /www/ folder in the server”
But the configuration lines say

  - url: /local/my-custom-card.js

How does this fit together?

The /local/ path maps to <home_assistant_root>/config/www