Hello
I have imported a module in nodered, see screenshot below. I no longer use this module, how do I completely delete it from Nodered?
Hello
I have imported a module in nodered, see screenshot below. I no longer use this module, how do I completely delete it from Nodered?
If you remove that entry and re-deploy, does it not remove the module?
If not, access a server terminal then:
cd ~/.node-red
npm remove node-rainbird
After running the npm remove command, restart node-red.
Thanks - I am just trying to understand a bit more about this.
I downloaded this into my pallete node-red-contrib-rainbird (node) - Node-RED
On that link it states that "This package uses a modified version of [node-rainbird] (GitHub - bbreukelen/node-rainbird: Rainbird controller in Node.js)". This is the class that I was using originally but I do not use it in my flow anymore, since I've now downloaded that node.
In the npm list I can see both the original node-rainbird (original post) and the new node node-red-contrib-rainbird.
Also in package.json I can still see "node-rainbird" as a dependency along with the new node I downloaded ("node-red-contrib-rainbird").
Will downloading the new node automatically install node-rainbird since it states that it is based on it? Or am I safe to remove node-rainbird using npm remove node-rainbird. I don't want to break the new node I've downloaded since I've spent 4 hours creating flows with it.
node-rainbird is a node.js package, not specific to node-red. And somewhat confusingly, not a "node" in a node-red sense.
The contrib package, if it relies on a node.js package, will self-install that package for you as a dependency and npm will remove it for you when you remove the contrib package - as long as it isn't being used by another package.
If you ever get into a complete mess with node-red packages, use a command prompt, go to the ~/.node-red (AKA "userDir") folder, stop node-red and delete (or rename if you are paranoid
) the node_modules folder. Then check that the dependencies section of the package.json file only has node-red packages that you actually want. Then do npm install. When that finishes, you can restart node-red and you should be good to go.
Note that, if you do follow that "nuke-from-orbit" approach, you might have to start node-red in safe mode to be able to remove any nodes that you got rid of but forgot to remove from your flows before-hand. Of course, if you renamed the node_modules folder, you can restore it, change your flows and then do the other part again.
Node-RED really is quite robust. ![]()
If you have a problem then all you have to do is restore your flows file from the backup that you will update before doing any more.
Thanks all!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.