# Subflow with config env:You have some unused configuration nodes

**URL:** <https://discourse.nodered.org/t/subflow-with-config-env-you-have-some-unused-configuration-nodes/92961>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [7 November 2024 07:38 UTC](https://discourse.nodered.org/t/subflow-with-config-env-you-have-some-unused-configuration-nodes/92961 "2024-11-07T07:38:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hagan](https://avatars.discourse-cdn.com/v4/letter/h/53a042/32.png) [@Hagan](https://discourse.nodered.org/u/Hagan)\
**Post date:** [7 November 2024 07:38 UTC](https://discourse.nodered.org/t/subflow-with-config-env-you-have-some-unused-configuration-nodes/92961/1 "2024-11-07T07:38:27Z")

</div>

I'm using NodeRed:4.0.5 + Dashboard 2. During this period, I put components into subflows for the sake of easy reuse. When all the components in my group are subflow components, the deployment will prompt "You have some unused configuration nodes", because in the configuration nodes, the corresponding group shows that 0 nodes are using this configuration.

Is this a BUG? What should I do to avoid this message during deployment?

---

<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:** [7 November 2024 08:23 UTC](https://discourse.nodered.org/t/subflow-with-config-env-you-have-some-unused-configuration-nodes/92961/2 "2024-11-07T08:23:09Z")

</div>

Welcome to the forum @Hagan

This is a known issue, see [SubFlow is not counted for config node `ui-group` usage · Issue #754 · FlowFuse/node-red-dashboard · GitHub](https://github.com/FlowFuse/node-red-dashboard/issues/754)

---

<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:** [7 November 2024 09:28 UTC](https://discourse.nodered.org/t/subflow-with-config-env-you-have-some-unused-configuration-nodes/92961/3 "2024-11-07T09:28:40Z")

</div>

Add a comment to the issue saying that it affects you, so that the developers know that it is an issue concerning others.

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [7 November 2024 12:30 UTC](https://discourse.nodered.org/t/subflow-with-config-env-you-have-some-unused-configuration-nodes/92961/4 "2024-11-07T12:30:28Z")

</div>

@knolleary,  
Before I start fixing the problem we need to agree on one thing:  
If a random node in a subflow uses an env config node, should that node be added to the config node users? I don't think so, for me only the subflow node should do it.

@joepavitt, I think the issue linked above can be moved to the core, thanks.

---

<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:** [7 November 2024 13:01 UTC](https://discourse.nodered.org/t/subflow-with-config-env-you-have-some-unused-configuration-nodes/92961/5 "2024-11-07T13:01:35Z")

</div>

> [@GogoVega](#):
>
> I don't think so, for me only the subflow node should do it.

Agreed - keeping track of that would get very complicated. Only count the subflow instance node as a user.

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [7 November 2024 21:32 UTC](https://discourse.nodered.org/t/subflow-with-config-env-you-have-some-unused-configuration-nodes/92961/6 "2024-11-07T21:32:10Z")

</div>

> <https://github.com/node-red/node-red/pull/4947>
>
> \- \[x\] Bugfix (non-breaking change which fixes an issue)
> \- \[\] New feature (non-…breaking change which adds functionality)
> 
> \## Proposed changes
> 
> Fixes https://github.com/FlowFuse/node-red-dashboard/issues/754.
> 
> \#4587 introduced a feature that allows nodes in a subflow to choose a config node from the environment variables.
> 
> It's the subflow node that will define which "real" config node will be the environment variable. It is also this node that should be added to the users of the config node.
> 
> This PR therefore handles it:
> \- when adding/removing the subflow node
> \- when saving the subflow node config
> \- into the history (undo/redo subflow node changes)
> 
> This PR also fixes the node object added to the config node users, it must be the proxy object. Detected in #4807.
> 
> \## Checklist
> 
> \- \[x\] I have read the \[contribution guidelines\](https://github.com/node-red/node-red/blob/master/CONTRIBUTING.md)
> \- \[\] For non-bugfix PRs, I have discussed this change on the forum/slack team.
> \- \[x\] I have run \`npm run test\` to verify the unit tests pass
> \- \[\] I have added suitable unit tests to cover the new/changed functionality

---

<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:** [21 November 2024 21:32 UTC](https://discourse.nodered.org/t/subflow-with-config-env-you-have-some-unused-configuration-nodes/92961/7 "2024-11-21T21:32:47Z")

</div>

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