# Where to find which nodes were installed

**URL:** <https://discourse.nodered.org/t/where-to-find-which-nodes-were-installed/70459>\
**Category:** General\
**Created:** [11 November 2022 16:04 UTC](https://discourse.nodered.org/t/where-to-find-which-nodes-were-installed/70459 "2022-11-11T16:04:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![warnert](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/warnert/32/108132_2.png) [@warnert](https://discourse.nodered.org/u/warnert)\
**Post date:** [11 November 2022 16:04 UTC](https://discourse.nodered.org/t/where-to-find-which-nodes-were-installed/70459/1 "2022-11-11T16:04:12Z")

</div>

My pi with node-red and the rest won't boot anymore after a powerfail.  
I have a backup of my config but that comes with a lot of errors. Missing nodes.  
Some are quite easy to find out what node it was (mysql) but others I cannot find.  
(ui\_tab, ui\_base, ui\_group, ui\_link f.i.)  
And the deveopment machine (pi) also hangs at boot.  
I can read the old sd card with another pi.  
But where can I find which nodes were installed?  
Or can I just copy the .node-red and the .npm maps to my new sd card?  
This is the list:  
ui\_tab  
ui\_group  
ui\_base  
ui\_link  
MySQLdatabase  
ui\_spacer  
zigbee2mqtt-server  
ui\_dropdown  
aggregator  
mysql  
ui\_chart  
ui\_date\_picker  
ui\_form  
ui\_gauge  
ui\_slider  
ui\_text  
ui\_button  
ui\_switch  
weekday  
eztimer  
ui\_text\_input  
ui\_numeric  
ui\_table  
cronplus  
ui\_led  
e-mail  
zigbee2mqtt-bridge  
zigbee2mqtt-in  
zigbee2mqtt-out  
zigbee2mqtt-get  
Is there a map where I can find which nodes are installed?

---

<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:** [11 November 2022 16:59 UTC](https://discourse.nodered.org/t/where-to-find-which-nodes-were-installed/70459/2 "2022-11-11T16:59:56Z")

</div>

> [@warnert](#):
>
> I can read the old sd card with another pi.  
> But where can I find which nodes were installed?

Assuming you used the official installer script, then look in `~/.node-red/package.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:** [11 November 2022 17:10 UTC](https://discourse.nodered.org/t/where-to-find-which-nodes-were-installed/70459/3 "2022-11-11T17:10:41Z")

</div>

And if you restore package.json, then go into the .node-red folder and run  
`npm install`  
it will install any missing nodes. If you don't want the latest versions of them all then also restore package-lock.json before running npm install and it will install the same versions you had previously.

---

<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:** [13 November 2022 20:14 UTC](https://discourse.nodered.org/t/where-to-find-which-nodes-were-installed/70459/4 "2022-11-13T20:14:42Z")

</div>

This flow will tell you everything. Just change the file paths in the read file nodes.

```auto
[{"id":"51fb56d2.8ca248","type":"inject","z":"d0860be6.7951b8","g":"68054db5.4e78b4","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":"","topic":"","payload":"","payloadType":"date","x":95,"y":2760,"wires":[["1dd9f4ac.8347eb","b0df5fa0.7698b"]],"l":false},{"id":"1dd9f4ac.8347eb","type":"file in","z":"d0860be6.7951b8","g":"68054db5.4e78b4","name":"","filename":"./data/nrmain_flows.json","filenameType":"str","format":"utf8","chunk":false,"sendError":false,"x":290,"y":2760,"wires":[["7db3c4dc.803e6c"]]},{"id":"b0df5fa0.7698b","type":"file in","z":"d0860be6.7951b8","g":"68054db5.4e78b4","name":"","filename":"./data/package.json","format":"utf8","chunk":false,"sendError":false,"x":250,"y":2880,"wires":[["b4c067a0.285bd8"]]},{"id":"7db3c4dc.803e6c","type":"json","z":"d0860be6.7951b8","g":"68054db5.4e78b4","name":"","property":"payload","action":"","pretty":false,"x":435,"y":2760,"wires":[["3aeb5629.c2b33a","9c8f63ea.e8083"]],"l":false},{"id":"3aeb5629.c2b33a","type":"change","z":"d0860be6.7951b8","g":"68054db5.4e78b4","name":"","rules":[{"t":"set","p":"totalNodes","pt":"msg","to":"$count(payload)\t","tot":"jsonata"},{"t":"set","p":"payload","pt":"msg","to":"payload^(type) {\t `type`: $count([$])\t}","tot":"jsonata"},{"t":"set","p":"nodeTypesCount","pt":"msg","to":"$count($keys(payload))","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":515,"y":2760,"wires":[["5de6fbf7.a75344"]],"l":false},{"id":"5de6fbf7.a75344","type":"debug","z":"d0860be6.7951b8","g":"68054db5.4e78b4","name":"All Nodes (incl. Config.)","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"\"Nodes: \" & totalNodes & \", Types: \" & nodeTypesCount","statusType":"jsonata","x":690,"y":2760,"wires":[]},{"id":"97a2dead.fea94","type":"debug","z":"d0860be6.7951b8","g":"68054db5.4e78b4","name":"Nodes, Tabs, Subflows","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"\"N: \" & payload.totalNodesCount & \", Tabs: \" & payload.tabsCount & \", Subflows: \" & payload.subflowsCount","statusType":"jsonata","x":680,"y":2820,"wires":[]},{"id":"9c8f63ea.e8083","type":"function","z":"d0860be6.7951b8","g":"68054db5.4e78b4","name":"","func":"msg.totalNodes = msg.payload.length\n\nlet tabsCount = 0, subflowsCount = 0, nodeTypesCount = 0\nlet totalNodes = 0\nlet tabs = {}, subflows = {}, nodeTypes = {}\n\nmsg.payload.sort(function(a, b) {\n var typeA = a.type.toUpperCase(); // ignore upper and lowercase\n var typeB = b.type.toUpperCase(); // ignore upper and lowercase\n if (typeA < typeB) {\n return -1;\n }\n if (typeA > typeB) {\n return 1;\n }\n\n // names must be equal\n return 0;\n})\n\nmsg.payload.forEach((el) => {\n if ( el.type === 'tab' ) {\n tabsCount++\n tabs[el.label] = el.id\n } else if ( el.type === 'subflow' ) {\n subflowsCount++\n subflows[el.name] = el.id\n } else {\n nodeTypes[el.type] = nodeTypes[el.type]+1 || 1\n totalNodes++\n }\n})\n\nmsg.payload = {\n 'totalNodesCount': totalNodes,\n 'tabsCount': tabsCount,\n 'subflowsCount': subflowsCount,\n 'nodeTypesCount': Object.keys(nodeTypes).length,\n 'tabs': tabs,\n 'subflows': subflows,\n 'nodeTypes': nodeTypes,\n}\n\nreturn msg","outputs":1,"noerr":0,"x":515,"y":2820,"wires":[["97a2dead.fea94"]],"l":false},{"id":"b4c067a0.285bd8","type":"json","z":"d0860be6.7951b8","g":"68054db5.4e78b4","name":"","property":"payload","action":"","pretty":false,"x":435,"y":2880,"wires":[["dff7c57.77c4138"]],"l":false},{"id":"dff7c57.77c4138","type":"debug","z":"d0860be6.7951b8","g":"68054db5.4e78b4","name":"Package Dependencies","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload.dependencies","targetType":"msg","statusVal":"\"#: \" & $count($keys(payload.dependencies))","statusType":"jsonata","x":690,"y":2880,"wires":[]},{"id":"2d29205.cb6abe","type":"comment","z":"d0860be6.7951b8","g":"68054db5.4e78b4","name":"How Many Nodes in my flow?","info":"Don't forget to change the path to your flow file.\n\nNote the oddity regarding subflows. \nThey appear firstly as type \"subflow\" which is the\ndefinition, then again in the form\n\"subflow:<id>\" once for each instance of that\nsubflow `<id>` in your flows.\n\nI show both a JSONata and a function node\napproach to getting the data but note that\nthe JSONata version _is not quite correct_.\nIn the sense that it doesn't subtract the tabs\nand subflows from the overal counts.\n\nSo while the execution time of both approaches\nseems to be pretty identical, the function node\nis more comprehensive.","x":200,"y":2720,"wires":[]}]

```

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/c/9c2a3cca6d71f35aca0593aec9b8a89bfebc0d7a.png)

---

<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:** [22 December 2022 21:41 UTC](https://discourse.nodered.org/t/where-to-find-which-nodes-were-installed/70459/5 "2022-12-22T21:41:17Z")

</div>

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