How to update function modules?

A Function node is currently using an old version of a package I added under "Setup". How do I get it to update?

I tried:

  • Deleting the module from the Setup tab an re-adding it.
  • Deleting the module from the node_modules directory in the project directory.
  • Deleting package-lock.json from the project directory.
  • Deleting .package-lock.json from the node_modules directory

Now it's gone - I deleted it - but Node-RED won't install the latest version.

It is very rarely a good idea to mess with npm's files. I would have expected the package to appear in Manage Palette and allow you to update it there.

To recover the situation go into your .node-red folder (assuming it is a conventional install) and run
npm remove the_package
npm install the_package
If there are any errors there then come back here. Otherwise restart node-red and it should be ok.