custom-cards / bar-card

Customizable Animated Bar card for Home Assistant Lovelace
MIT License
378 stars 54 forks source link

BUG: Error loading card #56

Closed firstof9 closed 4 years ago

firstof9 commented 4 years ago

Error message:

Uncaught SyntaxError: Unexpected token 'export' bar-card.js:5219

Home Assistant: 0.108.9 I've already clear cache and hard reloaded the frontend but the issue persists.

Let me know if you need any more information.

D-an-W commented 4 years ago

Similar here...

http://hassio.local:8123/community_plugin/bar-card/bar-card.js:5219:0 SyntaxError: Unexpected keyword 'export' 3:36:45 AM – components/system_log/init.py (ERROR)

Gluwc commented 4 years ago

I'm unable to reproduce this, so my only guess is it might be browser related? I've only tested it on chrome, maybe you're using something else?

D-an-W commented 4 years ago

Safari here (mac OS Catalina) and also on iOS Screenshot 2020-04-25 at 11 37 08

Klumpke commented 4 years ago

@D-an-W since version 3.1.0 you need to use type: module instead of type: js in your resources.

D-an-W commented 4 years ago

Thank you, will edit now.

Gluwc commented 4 years ago

@D-an-W since version 3.1.0 you need to use type: module instead of type: js in your resources.

Didn't even know it was still possible to set this up as type: js, maybe if you had it loaded as JS before they deprecated it?

Klumpke commented 4 years ago

Don't know. Had it loaded as type: js before and with version 3.1.0 this didn't work so i had changed it to type: module

D-an-W commented 4 years ago

I wish I knew where to change it! haha

Gluwc commented 4 years ago

The resrouces are now loaded seperately from the lovelace config. It's in Configuration>Lovelace Dashboards>Resources.

D-an-W commented 4 years ago

Sorted thanks, are they bigger than before or just my imagination?

Screenshot 2020-04-25 at 12 23 20

Gluwc commented 4 years ago

I don't know what it looked like before for you. However there were some changes with the title and name config options that might have changed the look of you card. (title now adds a header instead of changing the name of the bar).

firstof9 commented 4 years ago

I use HACS to manage it all guess it didn't change to module. Thank you.

ldb2000 commented 4 years ago

Could be good to add in the the readme.md