# Confused about potential naming conflicts between module names, node names, and palette or flow management

**URL:** https://discourse.nodered.org/t/confused-about-potential-naming-conflicts-between-module-names-node-names-and-palette-or-flow-management/75951
**Category:** Developing Nodes
**Created:** [1 March 2023 16:42 UTC](https://discourse.nodered.org/t/confused-about-potential-naming-conflicts-between-module-names-node-names-and-palette-or-flow-management/75951 "2023-03-01T16:42:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![CanyonCasa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/canyoncasa/32/76453_2.png) [@CanyonCasa](https://discourse.nodered.org/u/CanyonCasa)
#### Post date: [1 March 2023 16:42 UTC](https://discourse.nodered.org/t/confused-about-potential-naming-conflicts-between-module-names-node-names-and-palette-or-flow-management/75951/1 "2023-03-01T16:42:19Z")

</div>

Suppose I install a module **node-red-contrib-foo** , which adds a node **bar** to the palette. Then I install a second module **@me/node-red-special** , which also defines a node **bar** added to the palette.

How does node-red resolve this, as information about the node origin (i.e. module) doesn’t seem to appear in the _flows.json_ file? I can see how namespaces prevent module conflicts, but how does someone creating a node prevent naming conflicts with nodes of other modules?

Most of the node names I observe seem simple and likely to conflict at some point. For example, given the following code, how would I be certain that I am acting on my ‘bar’ node and not a different ‘bar’ node?

```plaintext
RED.nodes.eachNode(n=>{
  If (n.type===‘bar’) {
    // do something wrt my ‘bar’ node here…
  }
})

```

Is there a naming convention for node names that prevents this?

---

<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: [1 March 2023 21:14 UTC](https://discourse.nodered.org/t/confused-about-potential-naming-conflicts-between-module-names-node-names-and-palette-or-flow-management/75951/2 "2023-03-01T21:14:44Z")

</div>

It "resolves" it by throwing out the second node and giving you an error in the log. You cannot have 2 nodes with the same name.

Mostly, the "simple" names come from core nodes developed by the Node-RED devs. A sensible contributor creating a node needs to choose a name carefully and not block out someone else.

Of course, this is all open source. So anyone can do what they like, but if they annoy users, people will simply delete their nodes 😁

---

<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 March 2023 21:15 UTC](https://discourse.nodered.org/t/confused-about-potential-naming-conflicts-between-module-names-node-names-and-palette-or-flow-management/75951/3 "2023-03-15T21:15:09Z")

</div>

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