# Riot-nodes error

**URL:** <https://discourse.nodered.org/t/riot-nodes-error/47239>\
**Category:** General\
**Created:** [16 June 2021 12:59 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239 "2021-06-16T12:59:14Z")\
**Posts on this page:** 20\
**Page:** 4

<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:** [7 July 2021 15:44 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/87 "2021-07-07T15:44:15Z")

</div>

Sorry, I meant to say also package-lock.json

---

<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:** [7 July 2021 15:53 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/89 "2021-07-07T15:53:12Z")

</div>

I meant that you should post the file package-lock.json

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [7 July 2021 16:00 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/91 "2021-07-07T16:00:49Z")

</div>

[package-lock.json](https://discourse.nodered.org/uploads/short-url/zTT09qmSN1J7a8ZXnH6vC6hp6Jz.json) (1.2 MB)

---

<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:** [7 July 2021 16:03 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/92 "2021-07-07T16:03:27Z")

</div>

Have you got a folder called `nodes` in your .node-red folder? If so, what is in it?

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [7 July 2021 16:10 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/93 "2021-07-07T16:10:29Z")

</div>

I have folder node\_modules and in it i have a lot of folders, like- node-red-contribe-xbee-api

---

<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:** [7 July 2021 16:14 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/94 "2021-07-07T16:14:00Z")

</div>

Have you got a folder called `nodes`?

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [7 July 2021 16:15 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/95 "2021-07-07T16:15:23Z")

</div>

No, i don't

---

<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:** [7 July 2021 16:22 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/96 "2021-07-07T16:22:43Z")

</div>

OK, well I have no idea what is causing the node-red-dashboard ignored message, but the `Cannot read property 'forEach'` error is caused by a bad node that it is trying to load. I suggest first removing (using `npm remove`) node-red-contrib-xbee, node-red-contrib-xbee-api and riot-xbee. Then restart node-red and make sure the forEach error has gone. Assuming that it has then install those again (one at a time), assuming that you know that you need them, and restart node-red again each time. When the forEach error comes back you will know that the node you have just installed is bad.

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [7 July 2021 17:25 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/97 "2021-07-07T17:25:14Z")

</div>

After removing these three, NR starts working again (in NR the xbee and xbee-api nodes were still there). Then I install riot-nodes-master and NR stops working again, so I guess this is the bad 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:** [7 July 2021 17:42 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/98 "2021-07-07T17:42:34Z")

</div>

> [@Martin10](#):
>
> NR stops working again, so I guess this is the bad node

If you get the `forEach` error, then yes.

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [7 July 2021 17:48 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/99 "2021-07-07T17:48:31Z")

</div>

Yes, i have this `forEach` error. So the project is bad? If i try this project on RPI is will have any differents?

---

<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:** [7 July 2021 18:29 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/100 "2021-07-07T18:29:59Z")

</div>

> [@Martin10](#):
>
> If i try this project on RPI is will have any differents?

I have no idea. As I said at the start, it is years old and appears to be abandoned so may no longer work at all.

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [8 July 2021 11:45 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/101 "2021-07-08T11:45:34Z")

</div>

I try to install this one too, but the result were almost the same (is says that hame missing package file) ([GitHub - ReeceRobinson/NR-XBee: XBee node for use with Node-Red](https://github.com/ReeceRobinson/NR-XBee)).

Is there any way to install ony libraries for the modified xbee nodes?

 ![Xbee mod](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/0/10b59cbbf773a597f57ef8e0cbc1bbf8fc6f0a6d.jpeg)

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [8 July 2021 18:38 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/102 "2021-07-08T18:38:35Z")

</div>

Please, any help?

In general- If we wish to create a new node we have to create a .JS code, right?

So, how to insert this .JS code in NR, in order to use it as node?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 July 2021 20:27 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/103 "2021-07-08T20:27:14Z")

</div>

You can use Node.js packages in two ways with Node-RED if there isn't already a working node.

1. Create your own node (or adapt one that is similar to what you want). This requires you to learn about how nodes and Node-RED work internally and you will need at least 3 files. A package.json, a .js file for the runtime code and a .html file for the Editor/configuration code.

2. Install the package to your userDir folder and then create a reference to it either in the globals section of your settings.js or using the new features in the built-in function node which makes that a little simpler.

Note that not all node.js packages will work successfully with Node-RED but most seem to work just fine.

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [9 July 2021 10:49 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/104 "2021-07-09T10:49:23Z")

</div>

Please, any example tutorial?

Is this the only example that i can use?  
[https://nodered.org/docs/creating-nodes/first-node](https://nodered.org/docs/creating-nodes/first-node)

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [9 July 2021 18:18 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/105 "2021-07-09T18:18:09Z")

</div>

Please, any example tutorial?

Is this the only example that i can use?  
[https://nodered.org/docs/creating-nodes/first-node](https://nodered.org/docs/creating-nodes/first-node)

---

<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:** [9 July 2021 21:18 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/106 "2021-07-09T21:18:59Z")

</div>

No. You can view the SRC code for pretty much any node that is published on GitHub.

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [10 July 2021 11:03 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/107 "2021-07-10T11:03:54Z")

</div>

By SRC code you mean the .JS code, or .JS, .JSON and HTML?

So, i have to copy the SRC and than follow this steps ([Creating your first node : Node-RED](https://nodered.org/docs/creating-nodes/first-node)), or there is other ways?

It's obvious, that this things are new to me, so can anyone show me an example?

---

<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:** [10 July 2021 12:46 UTC](https://discourse.nodered.org/t/riot-nodes-error/47239/108 "2021-07-10T12:46:39Z")

</div>

> [@Martin10](#):
>
> so can anyone show me an example?

There are thousands of examples.

Open the source code in [any of these projects](https://github.com/search?q=node-red-contrib) (all files are relevant).

Use [Creating your first node : Node-RED](https://nodered.org/docs/creating-nodes/first-node) as a how to beginners guide and the [example node-red nodes source code projects](https://github.com/search?q=node-red-contrib) as extra help.

* * *

TBH, if you ditch Windows 7 and move to Windows 10 or Ubuntu (or buy a raspberry pi), you could probably have fixed this 24 days ago. I doubt with your current level of programming knowledge you will find making a contrib node easier that starting again with a fresh node-red install.

[Previous page](https://discourse.nodered.org/t/riot-nodes-error/47239.md?page=3)

[Next page](https://discourse.nodered.org/t/riot-nodes-error/47239.md?page=5)
