Adorkable / node-red-contrib-ui-led

A simple LED status indicator for the Node-RED Dashboard
MIT License
16 stars 12 forks source link

got "TypeError: Cannot read property 'length' of undefined" #44

Closed gdallaire closed 4 years ago

gdallaire commented 4 years ago

Describe the bug node red version = 0.20.8

To Reproduce

  1. install led-ui from "Manage palette"
  2. add the led to a flow, set the label

Expected behavior after deploying I get this error "TypeError: Cannot read property 'length' of undefined" and no led appears on the dashboard.

yoiang commented 4 years ago

Hey @gdallaire , thanks so much for reporting the bug!

I was able to reproduce it, I'll next set about what the issue is and see about a fix.

yoiang commented 4 years ago

Oh right, so check it! When I was reproducing it this is what was happening, less a bug with ui-led and more a not uncommon UX issue with node-red-dashboard:

Notice how when you place the new node it has a red triangle:

Screen Shot 2019-09-24 at 9 44 56 PM

It's complaining because it can't find a default group to assign itself to. If you go into the node's configuration:

Screen Shot 2019-09-24 at 9 45 27 PM

Set this and you should be good!

Lemme know if this isn't the issue!

gdallaire commented 4 years ago

when adding a ui-led there is a red triangle, I had to re-set the default group (that was already set) and then the red triangle was removed.

but ui-led still doesn't appear in the dashboard :(

image

yoiang commented 4 years ago

Hmm, sorry to ask what may be silly questions, have you assigned it to a tab as well? Are there any additional complaints in the console? If so could you include the full stack?

The library has also been updated to 0.3.1 with one bug fix included, it shouldn't be related but 🤷‍♂️give it a whirl just in case

gdallaire commented 4 years ago

yes in the "Home" tab :

image

Dashboard :

image

gdallaire commented 4 years ago

just took the time to upgrade to 0.3.1, restarted node-red, then the module was not installed anymore

image

then I re-installed it and now

image

all seem OK !

thanks

yoiang commented 4 years ago

Perfect! I'm glad we could sort it out :)

gaur-gaur commented 3 years ago

i am getting same issue "TypeError: Cannot read property 'length' of undefined" in command promt in which i start node red command