Prevent auto reinstall of removed nodes

Some time ago i installed the telegram bot package (using palette manager) just to play with it in spare time, then removed it since it wasn't needed anymore (using npm uninstall)

I'm unable to definitely take rid of it since nodered keep reinstalling it every time i remove it and reboot nodered, it's like it's haunting me.

Is there a way to just uninstall with npm and make nodered forget it?

Node red can't automatically install a node, as far as I know.
Show us the terminal log from the uninstall. Make sure you are in the .node-red folder when you do it.

is it still in the package.json in your user directory (e.g. ~/.node-red) or in the package-lock.json?

Next time i have the log i will show you but:

  • i'm not in the .node-red folder since nodered is mounted as dependency of my app. and configuration is passed programmatically
  • no files are saved on disk at all, since i've implemented a storage plugin to route all the data over a mongodb collection
  • the package is not listed in package.json nor package-lock.json after npm uninstall

However i'm noticing that if the package is still listed into the json defined in (the former file who is on db in my project) ".config.json" but effectively not installed, something like "npm install thatPackage" occur under the hood.

It's just that operation that i want to prevent WITHOUT effectively touching the db.
Another question pops up now while i'm writing: in the standard nodered deploy, an npm uninstall act also on this file to remove references to nodes?

It sounds like you have the autoInstallModules option set. This is the option that causes Node-RED to automatically reinstall anything listed in .config.json that it doesn't find installed.

You have two options:

  1. uninstall the module using the Palette Manager in the editor (or using node-red-admin) - basically, get Node-RED to uninstall it, so it updates .config.json for you

  2. without NR running, hand-edit .config.json to remove the entry for the node.

Where is that option?

It is an undocumented option that doesn't appear in the default settings file.

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