Node-RED is built over Node.js which uses
Once you’ve tried for a bit to understand what the issues are, it may be time to call time and get drastic.
The following commmands will clean out the packages installed for your live instance of Node-RED - assuming you have it installed via the “standard” default method. If not, you will need to adjust the folder you operate in.
cd ~/.node-red rm package-lock.json rm -R node_modules npm install
That will cleanly reinstall all of the packages marked in your
package.json file. So make sure that is correct first. Every time you install a package (as long as you have reasonably up-to-date versions of Node.js and npm) whether from the NR admin ui or command line, it gets added to package.json.
I now always remove the lock file as well if I’m having issues as that can be the cause of some issues. The lock file isn’t generally needed in NR installations.
Note, as always, I’ve assumed you have a “standard” install of Node-RED which puts your userDir as
~/.node-red (and the equivalent on Windows). If you use an installation scheme like mine, it will be in a different place as noted by the command used to start NR.