Manually installed Node not showing up in palette

2,258 views
Skip to first unread message

Rial Williams

unread,
Dec 8, 2016, 5:22:01 PM12/8/16
to Node-RED
All,

I am trying to understand how to create my own NodeRED nodes and am following procedures found here.  Specifically I have:
  • Created "lower-case" directory in /home/<username>/.node-red/node_modules directory (where the other nodes seem to be living).
  • Created "lower-case.js" and "lower-case.html" files in that directory and populated them with the code listed on NodeRED's "Creating your first node" page.
  • Stop and start node-red service.
  • Refresh NodeRED webpage (<IPAddress>:1880/#)
  • When I looked in the NodeRED palette, I do not see my lower-case node in the Function section where I expected to see it (or anywhere else in the palette)
I am running Ubuntu 16.04 as a LAMP server, Node 6.9.2, and NodeRED 0.15.2.

I have another machine with similar versions of the above softwares and will try that later tonight if I can get to it.  This must be some stupid, simple thing.

TIA

Rial (AutoDoc) Williams

Mark Setrem

unread,
Dec 8, 2016, 5:29:50 PM12/8/16
to Node-RED
Try creating a new directory called "nodes" in your .node-red directory and move your .js and .html files into that.

Then restart node-red and see if they appear.

Nicholas O'Leary

unread,
Dec 8, 2016, 5:39:20 PM12/8/16
to Node-RED Mailing List
Hi Rial,

As Mark said, if you are creating a node with just a .js and .html file, they should be put in the nodes directory in your user directory -  ~/.node-red/nodes

When you move to creating the node as a properly packaged module, you would put them in a subdirectory under ~/.node-red/node_modules, but crucially, you would include a package.json file. Without that file, node-red won't know its a module that can be loaded.


Regards,
Nick



On 8 December 2016 at 22:29, Mark Setrem <mse...@gmail.com> wrote:
Try creating a new directory called "nodes" in your .node-red directory and move your .js and .html files into that.

Then restart node-red and see if they appear.


--
http://nodered.org

Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send an email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/f55b63ae-7bc6-4b65-b56d-63baae6c574b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Colin Law

unread,
Dec 9, 2016, 4:10:40 AM12/9/16
to node...@googlegroups.com
Just a note on this, if you have multiple self created nodes you can
put them in subdirectories under .node-red/nodes which may help you to
organise them. So yours might go in .node-red/nodes/lower-case

On 8 December 2016 at 22:29, Mark Setrem <mse...@gmail.com> wrote:
> Try creating a new directory called "nodes" in your .node-red directory and move your .js and .html files into that.
>
> Then restart node-red and see if they appear.
>
>
> --
> http://nodered.org
>
> Join us on Slack to continue the conversation: http://nodered.org/slack
> ---
> You received this message because you are subscribed to the Google Groups "Node-RED" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.

Rial Williams

unread,
Dec 9, 2016, 8:48:28 AM12/9/16
to Node-RED
Thanks guys!  I created a "nodes" directory under the ~/.node-red directory, moved my "lower-case" directory and its two files (.js and .html) into it, restarted NodeRED and lo and behold, the node now shows up in my palette as desired.  What threw me off was in reading the "Creating a simple node" section on the "Creating your first node" webpage, where I read the following:

A local node just consists of the .js and .html files.

These files can be located within either the nodes directory in your user directory, typically ~/.node-red/nodes, or one of the directories defined in the nodesDir setting.

When I went looking for the "nodes" directory, it wasn't there.  I did see the "node_modules" directory at which point I wrongly assumed that the NodeRED guys may have changed directory names subsequent to the web page documentation (and it was filled with nodes) so I shoved my new node stuff in there.  Perhaps the "Creating a simple node" text should be changed to keep the next poor dumb guy from falling in the same pit as I.  Maybe something like:
These files MUST be located within either the nodes directory in your user directory, typically ~/.node-red/nodes, or one of the directories defined in the nodesDir section of settings.js found in the ~/.node-red directory.  If you do not see the nodes directory (it's not created during the default installation), you'll need to create it and then install your node files there.  The best practice would be to create individual directories under nodes to hold each node you create to make it easier to find what you're after.
Again, thanks to all who steered me, an old burnt out PLC programmer and controls guy, through the wild west world of open-source software.  I'm currently working on how to apply industry 4.0 concepts and such to what we do where I'm working (small oem with big market share in our niche) and am convinced that NodeRED, and small ZigBee (or BLE) sensors glued together with MQTT are the way to go when tying non time-sensitive or safety-related signals together.

Francisco Bernardo

unread,
Jun 1, 2017, 8:04:36 PM6/1/17
to Node-RED
+1
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages