# TypeError: Cannot read property 'config' of null

**URL:** <https://discourse.nodered.org/t/typeerror-cannot-read-property-config-of-null/47446>\
**Category:** General\
**Created:** [21 June 2021 15:10 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-config-of-null/47446 "2021-06-21T15:10:24Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Franco](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@Franco](https://discourse.nodered.org/u/Franco)\
**Post date:** [21 June 2021 15:10 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-config-of-null/47446/1 "2021-06-21T15:10:24Z")

</div>

Hello,

Each time I run the program that I have done, it works but node-red shows me the following error 3 times: TypeError: Cannot read property 'config' of null

 ![Captura de pantalla de 2021-06-21 12-09-45](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/d/fd6b24e900aef15ce0fd69987f1f4434be02cb6b.png)

Do you know what can I do?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [21 June 2021 15:48 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-config-of-null/47446/2 "2021-06-21T15:48:35Z")

</div>

click the number in gray after `node: xxxxx.yyyyy`  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/b/cb915bbbea2661e565d92292f03647252cd1b544.png)

does it take you to a specific node?

If not, copy the gray number and search it in node-red using CTRL + F

Once you find what node it is from, you can find it in the flows library and then look on its repository for known issues.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [21 June 2021 15:51 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-config-of-null/47446/3 "2021-06-21T15:51:59Z")

</div>

Also check any values you have entered in its configuration.

---

<div class="post-metadata">

**Author:** ![Franco](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@Franco](https://discourse.nodered.org/u/Franco)\
**Post date:** [21 June 2021 16:12 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-config-of-null/47446/4 "2021-06-21T16:12:39Z")

</div>

Yes! It shows me the nodes I have marked. They belonged to a Group that I have disabled (I don't think that's the problem):

 ![Captura de pantalla de 2021-06-21 13-11-19](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/c/ac71ac6814f9350b59ed36324a9dac420b7f5b72.png)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [21 June 2021 16:21 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-config-of-null/47446/5 "2021-06-21T16:21:29Z")

</div>

Stick a `debug` node (set to dsplay the complete msg object) on each of the `functon` nodes and `link-in` nodes to see what is being passed to the `switch`.

then you should be able to see what is in the msgs.

---

<div class="post-metadata">

**Author:** ![Franco](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@Franco](https://discourse.nodered.org/u/Franco)\
**Post date:** [21 June 2021 16:28 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-config-of-null/47446/6 "2021-06-21T16:28:39Z")

</div>

I have done this, but they don't show me anything:

 ![Captura de pantalla de 2021-06-21 13-28-22](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/c/8ccb97f9678afd90403ca74808b27d4ab352c42b.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [21 June 2021 16:37 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-config-of-null/47446/7 "2021-06-21T16:37:48Z")

</div>

> [@Franco](#):
>
> It shows me the nodes I have marked. They belonged to a Group that I have disabled (I don't think that's the problem)

I can pretty much guarantee if the error links to them nodes, then they are the problem. What is the full name of this type of node?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [21 June 2021 16:38 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-config-of-null/47446/8 "2021-06-21T16:38:23Z")

</div>

So let me see if I understand.

1. When you click on one of the node id's in the debug panel, it hi-lights one of the three switch nodes...correct?
2. afterr adding the `debug` nodes and `deploying` the errors show up but nothing in the debug panel from the debug nodes.

I'd like you to try three more things

1. change the debug node panel option from `all nodes` to `current flow`  
 ![Screen Shot 2021-06-21 at 12.35.53 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/d/8df0a4c6678683bc7f919a0eb80029c2360d191b.png)
2. add a `catch` node to the flow tab and attach it to a `debug` node (set to display the complete msg object) and test it.
3. after testing if you still get the error, disable the nodes and try again.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [21 June 2021 20:21 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-config-of-null/47446/9 "2021-06-21T20:21:09Z")

</div>

Please stop node-red and start it again in a terminal. Then copy/paste the terminal output here, from the start to where it shows the errors.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [21 June 2021 20:27 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-config-of-null/47446/10 "2021-06-21T20:27:58Z")

</div>

> [@Franco](#):
>
> They belonged to a Group that I have disabled (I don't think that's the problem):

Isn't this the telling bit of information? If they are UI nodes that expect to be in a group and you've disabled the group, then it would appear those nodes don't handle "not being in a group" very well.

What more information is needed from the startup log? What we really need to know is, as Steve asked, exactly what type of nodes are they? Are they the normal Node-RED Dashboard Switch nodes, or a contrib node?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [21 June 2021 20:32 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-config-of-null/47446/11 "2021-06-21T20:32:36Z")

</div>

The log will show the versions of stuff. One possibility is that it is an old dashboard version (I seem to remember a fix for this some time ago). Alternatively I think the log is likely to show which node is failing. I suspect it may be the ui-led nodes.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [22 June 2021 14:24 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-config-of-null/47446/12 "2021-06-22T14:24:01Z")

</div>

I can confirm that the ui-led node generates a similar error in the log if the group it is in is disabled.

```auto
TypeError: Cannot read property 'config' of null
    at new LEDNodeConstructor (/home/colinl/.node-red/node_modules/node-red-contrib-ui-led/dist/nodes/ui_led/ui_led.js:25:44)
    at Object.createNode (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/util.js:86:27)
    at Flow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:205:48)
    at start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/index.js:371:33)

```

Interestingly, though, this does not appear in the debug pane (node red 1.3.5, dashboard 2.29.1, ui-led 0.4.9). I have submitted an issue on the node. [LED node does not handle being in a disabled group - Cannot read property config of null · Issue #80 · Adorkable/node-red-contrib-ui-led · GitHub](https://github.com/Adorkable/node-red-contrib-ui-led/issues/80)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 August 2021 14:24 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-config-of-null/47446/13 "2021-08-21T14:24:41Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
