Many months ago, I used openhabian-config to install Node-Red. It’s been working well with the few flows I’ve created.
I recently used node-red-log to examine Node-Red’s log and discovered a warning message upon startup. Apparently, the serialport module is version 48 and the version of node.js that’s running requires version 57.
I googled the warning message and found many solutions but none that referred specifically to Node-Red + OpenHAB + Raspberry Pi (they often refer to something called “electron”). I’m hesitant to apply any of the solutions I found because I’m concerned I may make things worse. I don’t fully understand the implications of using “npm rebuild” or “npm install” for my openhabian-based installation of Node-Red.
On a somewhat related note, “Manage Palette” was missing from Node-Red’s main menu. I discovered this can happen when “npm” is missing. I installed npm and now Manage Palette is visible in the menu. That’s about the limit of my involvement with npm so far!
Can someone explain how I can (safely) upgrade the serialport module?
30 Sep 22:13:41 - [info] Node-RED version: v0.18.4
30 Sep 22:13:41 - [info] Node.js version: v8.11.1
30 Sep 22:13:41 - [info] Linux 4.14.62-v7+ arm LE
30 Sep 22:13:41 - [info] Palette editor disabled : npm command not found
30 Sep 22:13:41 - [info] Loading palette nodes
30 Sep 22:13:50 - [info] Dashboard version 2.9.0 started at /ui
30 Sep 22:13:52 - [warn] ------------------------------------------------------
30 Sep 22:13:52 - [warn] [node-red-node-serialport/serialport] Error: The module '/root/.node-red/node_modules/serialport/build/Release/serialport.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
30 Sep 22:13:52 - [warn] ------------------------------------------------------