How to install missing nodes (all nodes, and how to find which ones)

Hallo
every time I import examples there are nodes included which are not available on my clean installation.
I would like to see from which library those node have been taken by the developer.
All I se is a grey box 'missing node'.
How do I find out what was meant?

1 Like

Excellent question. I'm not aware of how to do this except by trial and error. It's particularly painful when the node I need (or think I need) has a conflict with a node I already have installed. This is why I always post what nodes I'm using when I upload a flow and why I use comment nodes in my flows with the same information. Hopefully someone has a trick they can teach us on this topic.

Here is a flow that will list the type of each node used in a flow. You just have to put the path to teh flow file in the inject node.

[{"id":"812b779e0d82b93f","type":"tab","label":" flow node type extractor","disabled":false,"info":"","env":[]},{"id":"ca75948591893243","type":"inject","z":"812b779e0d82b93f","name":"put path to json file here","props":[{"p":"filename","v":"/Users/paul/.node-red/flownodenames.json","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":190,"y":80,"wires":[["118ab42b69ca9fc2"]]},{"id":"118ab42b69ca9fc2","type":"file in","z":"812b779e0d82b93f","name":"","filename":"filename","filenameType":"msg","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":160,"y":140,"wires":[["9d54e5d048488ef6"]]},{"id":"9d54e5d048488ef6","type":"json","z":"812b779e0d82b93f","name":"Convert to an object","property":"payload","action":"obj","pretty":false,"x":200,"y":200,"wires":[["cd0aaa639c2362cb"]]},{"id":"cd0aaa639c2362cb","type":"split","z":"812b779e0d82b93f","name":"split the object into seperate messages","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"type","x":260,"y":260,"wires":[["bd85bd70e9d45d0d"]]},{"id":"bd85bd70e9d45d0d","type":"change","z":"812b779e0d82b93f","name":"get rid of everything but the node name","rules":[{"t":"set","p":"payload2","pt":"msg","to":"payload.type","tot":"msg"},{"t":"move","p":"payload2","pt":"msg","to":"payload","tot":"msg"},{"t":"delete","p":"filename","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":260,"y":320,"wires":[["80c45feea6bab6f3"]]},{"id":"80c45feea6bab6f3","type":"join","z":"812b779e0d82b93f","name":"Join all the names into an object","mode":"auto","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":230,"y":380,"wires":[["34260c036c10cc4c"]]},{"id":"34260c036c10cc4c","type":"sort","z":"812b779e0d82b93f","name":"sort all the names","order":"ascending","as_num":false,"target":"payload","targetType":"msg","msgKey":"payload","msgKeyType":"elem","seqKey":"payload","seqKeyType":"msg","x":190,"y":440,"wires":[["eead538fef8c139a","ca6447d4b244c062"]]},{"id":"eead538fef8c139a","type":"function","z":"812b779e0d82b93f","name":"Remove duplicate node names.","func":"let nodeNames = msg.payload;\nlet size = nodeNames.length\nlet uniqueNames = []\nfor (let i = 0; i < size; i++ ) {\n    if (nodeNames[i] != nodeNames[i+1]) {\n       uniqueNames.push(nodeNames[i])\n    }   \n}\nmsg.payload = uniqueNames    \nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":230,"y":500,"wires":[["016c6a07273400e0"]]},{"id":"016c6a07273400e0","type":"debug","z":"812b779e0d82b93f","name":"list the nodes in the debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":240,"y":560,"wires":[]},{"id":"ca6447d4b244c062","type":"debug","z":"812b779e0d82b93f","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":600,"y":440,"wires":[]}]
1 Like

I deliberately broke Dave's flow for illustration purposes...

If you import a flow which uses nodes that you don't have installed then you get the simple warning message.

If you try and deploy you get another message:

And if you "Search for unknown nodes" you get another, which also tells you which flow[s] to look in:

So it looks like I don't have a splitz node installed. That may be enough to find the node in flows.nodered.org and there is no problem using "Manage palette" to install it and try to deploy again.

The only real difficulty is when the node is part of a package like say ui_gauge (part of node-red-dashboard).
I don't know a good method beyond duckduckgo to find which package a given node type belongs to.

1 Like

Thanks.
Of course it obvious for some blocks which have a good name, like "mysql".

its more aboute thing like these:
image
"smoothing" can be anything.
There is a smoothing library - installed it and it worked. But whats the counter?

Of course there are ways. But NR knows when the block is installed. So it must have an unique ID. Otherwise it wouldnt know that its there after installation.

Node red does not know the original node name, it only remembers the node type (that is the smooth and counter you saw when you deploy). There are ideas to include the original node name in the flow file at some point, but it is not there yet. It is not just a matter of remembering it when the node is installed, as the node may not be installed via node red, it could be installed via the command line (npm install node-red-whatever) in which case node-red has no direct knowledge of it. It would have to go and find it somehow.

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