# How Do I Find Lost Junctions

**URL:** https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437
**Category:** General
**Created:** [11 March 2023 17:53 UTC](https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437 "2023-03-11T17:53:34Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)
#### Post date: [11 March 2023 17:53 UTC](https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437/1 "2023-03-11T17:53:34Z")

</div>

As the topic says. I found `junction`s being placed NOT under the cursor so would like to check that I have found them all.

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [11 March 2023 18:16 UTC](https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437/2 "2023-03-11T18:16:55Z")

</div>

A little more info please like NR version, a copy of the flow tab you see the issue, a screen shot of the problem. All that would be helpful.

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [11 March 2023 19:34 UTC](https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437/3 "2023-03-11T19:34:02Z")

</div>

Here is a flow to find all the junctions in /home/pi/.node-red/flows.json. (change the filename to suit your setup).  
It lists the ID of each junction (I don't think that you can find a junction by it's id?) and the name of the editor tab it's on.  
Junctions with no outgoing wires are listed via a seperate debug node, on the assumption that these are more likely to be unwanted.  
It even comes with a free unconnected junction.  
I _think_ it works whether flowFilePretty in settings.js is true or false.

 ![Untitled 4](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/8/781a02da5e1bf194e59a9cbf6f7baf01d659c0cc.jpeg)

```auto
[{"id":"72e3ac42d134d33c","type":"tab","label":"Find Junctions","disabled":false,"info":"","env":[]},{"id":"cd87c7e79d58104f","type":"junction","z":"72e3ac42d134d33c","x":560,"y":80,"wires":[[]]},{"id":"bcd4bc8e5fa549df","type":"file in","z":"72e3ac42d134d33c","name":"","filename":"/home/pi/.node-red/flows.json","filenameType":"str","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":300,"y":100,"wires":[["5989a3158b6f6489"]]},{"id":"5989a3158b6f6489","type":"json","z":"72e3ac42d134d33c","name":"","property":"payload","action":"","pretty":false,"x":150,"y":160,"wires":[["d01ad68650990728"]]},{"id":"f492b248145e9d02","type":"inject","z":"72e3ac42d134d33c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":100,"wires":[["bcd4bc8e5fa549df"]]},{"id":"05ba2a95c3f30851","type":"debug","z":"72e3ac42d134d33c","name":"Junctions with outgoing wires","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":800,"y":140,"wires":[]},{"id":"79c471bdce623a4f","type":"function","z":"72e3ac42d134d33c","name":"function 29","func":"let tablist = flow.get(\"tablist\")\nfor (let i in msg.payload) {\n let newmsg = {}\n if (msg.payload[i].type == \"junction\") {\n newmsg.payload = {\"id\": msg.payload[i].id, \"Tab\": tablist[msg.payload[i].z]}\n if (msg.payload[i].wires[0].length == 0) {\n node.send([null, newmsg])\n }\n else {\n node.send([newmsg, null])\n }\n }\n}\nreturn (tablist)\n","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":530,"y":160,"wires":[["05ba2a95c3f30851"],["c782a65a2cdc9371"]]},{"id":"c782a65a2cdc9371","type":"debug","z":"72e3ac42d134d33c","name":"Junctions with no outgoing wires","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":810,"y":180,"wires":[]},{"id":"d01ad68650990728","type":"function","z":"72e3ac42d134d33c","name":"Find tab names","func":"let tablist = {}\nfor (let i in msg.payload) {\n let newmsg = {}\n if (msg.payload[i].type == \"tab\") {\n tablist[msg.payload[i].id] = msg.payload[i].label\n }\n}\nflow.set(\"tablist\", tablist)\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":320,"y":160,"wires":[["79c471bdce623a4f"]]}]

```

---

<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 March 2023 22:43 UTC](https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437/4 "2023-03-11T22:43:23Z")

</div>

Have you tried `ctrl-f` `junction` ? (In the node-red editor)

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [11 March 2023 23:20 UTC](https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437/5 "2023-03-11T23:20:49Z")

</div>

I have, but it doesn't find junctions. In contrast to ctrl-f group, which finds groups.

---

<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 March 2023 23:36 UTC](https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437/6 "2023-03-11T23:36:42Z")

</div>

Hmmmm it's possible "junction" is not indexed. Should probably be raised as an issue.

---

<div class="post-metadata">

### Author: ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)
#### Post date: [11 March 2023 23:52 UTC](https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437/7 "2023-03-11T23:52:00Z")

</div>

Node-RED 301.0 beta2 is where the junctions were not being placed under the cursor (see [Node-RED 3.1.0-beta.2 released](https://discourse.nodered.org/t/node-red-3-1-0-beta-2-released/76192/40)) for details

However, I have also tried on v3.02 and I still haven't found a way of finding `junction`s. As jbudd says, `ctrl-f` `junction` does not work (type in `junction` - no matches found)

@jbudd Thank you for the flow, it does work. I now know I have a couple of random junctions somewhere, but no way of finding them 🤔

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [11 March 2023 23:54 UTC](https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437/8 "2023-03-11T23:54:11Z")

</div>

We don't index junctions because you cannot edit any properties and give them names. So any search will just give you a long list of "junction" and no actual help narrowing down the one you are looking for.

---

<div class="post-metadata">

### Author: ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)
#### Post date: [12 March 2023 00:24 UTC](https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437/9 "2023-03-12T00:24:41Z")

</div>

It would be handy if I could get them to show up at all. From the flow above I have 2 junctions floating, I also have the ids & Tab

I finally found them under a group. (lots of moving stuff around required)

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [12 March 2023 08:54 UTC](https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437/10 "2023-03-12T08:54:46Z")

</div>

> [@Buckskin](#):
>
> finally found them under a group

That's odd. Groups are drawn on a lower layer to all nodes, so should never obscure them.

---

<div class="post-metadata">

### Author: ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)
#### Post date: [12 March 2023 14:27 UTC](https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437/11 "2023-03-12T14:27:48Z")

</div>

Sorry, when I said 'under a group' I meant under a node in a group. I moved a whole bunch of nodes as part of a group and that was when it became visible.

---

<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: [12 March 2023 15:15 UTC](https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437/12 "2023-03-12T15:15:24Z")

</div>

Wasn't the node showing the overlapping nodes warning?

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [12 March 2023 15:38 UTC](https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437/13 "2023-03-12T15:38:26Z")

</div>

That would only happen if nrlint was installed, which it isnt by default.

---

<div class="post-metadata">

### Author: ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)
#### Post date: [12 March 2023 18:40 UTC](https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437/14 "2023-03-12T18:40:03Z")

</div>

Colin, no overlapping nodes warning.

Should I be installing nrlint, and if so what are the downsides for an old guy who likes things straight-forward?

---

<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: [12 March 2023 21:57 UTC](https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437/15 "2023-03-12T21:57:44Z")

</div>

> [@knolleary](#):
>
> That would only happen if nrlint was installed

Oh yes, I had forgotten that.

---

<div class="post-metadata">

### Author: ![parasaurolophus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/parasaurolophus/32/18729_2.png) [@parasaurolophus](https://discourse.nodered.org/u/parasaurolophus)
#### Post date: [16 March 2023 17:05 UTC](https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437/16 "2023-03-16T17:05:07Z")

</div>

As an old guy who likes tidy code, I always run with nrlint enabled. With default settings it may light up like a yuletide festival when you first activate it, but you can choose either to disable certain checks (like "default name") or enjoy that same sense of self-satisfied smugness following a thorough spring cleaning if you go through and address them all. Then, going forward, you get nice warnings that are easy to address as you go.

---

<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: [15 May 2023 17:05 UTC](https://discourse.nodered.org/t/how-do-i-find-lost-junctions/76437/17 "2023-05-15T17:05:25Z")

</div>

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