Unable to delete unused config nodes

I deleted some unused flows and now when I hit Deploy, I get this:

bad nodes

But none of the nodes or flows exist, (Workshop Light was ne of the deleted flows), so there's nothing to delete.

I tried deleting .config.json, but NR just recreated it with the missing nodes.

Help, please before I just reinstall NR.

If you delete a node using a config node the config node isn’t deleted (because it can be in use by others or suitable to use it later).
To delete these you have to go to the config tab on the right panel.
It seems that these are dashboard nodes. Perhaps take a look on the dashboard panel.

Have you tried exporting your flow, add a new tab, delete the existing tab, do a full deploy, delete any leftover config nodes then importing your flow again?

You should never delete .config.json - it does not contain any flow configuration, but does contain all of your runtime, project and editor configuration.

Reinstalling Node-RED will not help in the slightest either - you wouldn't reinstall Microsoft Word if you made a typo in a letter you were writing with it.

From your screenshot, it is odd that it should be claiming you have unused config nodes when the config node sidebar doesn't show anything. You can also use search for the nodes using Ctrl-F to see if they are hidden somewhere - although not sure how that would be possible.

All of the nodes in your flow are in the flow file. That is the file that you should look at - you'll have to check the node-red log for the full path to the file it is using, just to be sure. Check to see if that file contains any reference to ui_switch or wemo.

Thanks- that was it.

No- Nothing on the dashboard.

Thanks, I really appreciate the quick response.

1 Like

Maybe this is similar to the problem I had.

I had a bunch of flows and nodes I had deleted but where still hanging around, hidden from me, causing issues like you show.

I think the way I resolved it was as per zenofmud noted above.

I might have actually done a full export of the flow and saved to a text file. Closed Node-Red, deleted the .flow file, restarted Node-Red and reimported the flow. A bunch of nodes I thought I had deleted appeared.

In my case I had installed the Modbus node module, played around with it building some flows, then deleted all the flows that used the Modbus nodes and uninstalled the Modbus node module. I kept getting errors saying some nodes needed the Modbus node module and were not properly configured.

I also had an issue where an unused config node (I think it was "localhost;1883") was also somehow still attached to the removed Modbus node module and was causing issues. When I deleted it from the list the error went away.

Why these issues occur is above my understanding of node-red.

Thanks for the input. I had already tried all the usual suspects; deleting unused config nodes, deleting unneeded flows, etc. But, I never thought that the flows.json file would still have the problem nodes even after deleting them.

My solution, kindly prompted by Knolleary, was to first make a backup copy of config.json just in case. I then used JSON Formatter to make the json code more readable. Then in a text editor it was easy to find and delete the offending nodes. I then replaced nodes.json into the node-red folder. Everything was fine after that.

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