# RED.nodes.getNode fails to find node

**URL:** <https://discourse.nodered.org/t/red-nodes-getnode-fails-to-find-node/19235>\
**Category:** General\
**Created:** [16 December 2019 19:17 UTC](https://discourse.nodered.org/t/red-nodes-getnode-fails-to-find-node/19235 "2019-12-16T19:17:23Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [17 December 2019 23:45 UTC](https://discourse.nodered.org/t/red-nodes-getnode-fails-to-find-node/19235/2 "2019-12-17T23:45:18Z")

</div>

> [@magothe](#):
>
> Any ideas why?

Hi Chris,

I'm not very sure why this happens, but I '_think_' the OccupancyTrigger node is at this stage not available entirely in the runtime yet. But I might be wrong!

I had a [question](https://discourse.nodered.org/t/red-nodes-getnode-fails-on-windows-10/18069) recently, that was a bit similar to yours. At the end I found that I was calling the `RED.nodes.getNode` a bit too soon, because the node was at the particular moment not fully loaded yet.

Can't you workaround it like this:

```auto
node.schedule.setupStatusReporting(this);

```

and this:

```auto
node.setNodeActiveStatus = function(nodeToSet) {
    nodeToSet.status({fill: "green", shape: "dot", text: "active"});
};

```

Good luck with it!  
Bart

---

_[View the full topic](https://discourse.nodered.org/t/red-nodes-getnode-fails-to-find-node/19235)._
