I have a problem after installing node-red-node-serialport.
After starting node red I get the following message:
7 Apr 20:22:05 - [info] Loading palette nodes
7 Apr 20:22:10 - [warn] ------------------------------------------------------
7 Apr 20:22:10 - [warn] [node-red-node-serialport/serialport] Error: The module '/home/pi/.node-red/node_modules/@serialport/bindings/build/Release/bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 79. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install). RPI details:
npm -v 6.14.4
node -v v13.11.0 OS
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
have tried re-compiling or re-installing
the module (for instance, using npm rebuild or npm install). perhaps not correctly.
Installed on main ubuntu machine ok. have deleted and reinstalled npm, node, node-red. so latest of everything. new install of rpi, serial port access ok using other apps.
2020-04-07T18:20:11.445Z [err] npm
2020-04-07T18:20:11.448Z [err]
2020-04-07T18:20:11.449Z [err] WARN npm
2020-04-07T18:20:11.449Z [err] npm does not support Node.js v10.15.2
Node.js is latest 13.11.0 Newly installed as is RPI OS, NPM and node-red.
You would be better to use the recommended install/update script for installing node red, that way you would get a consistent set of tools. Nodejs 13.x is not an LTS version and is not recommended. You should use 10.x or 12.x.
If you run the script now it will probably tidy things up, though it is possible there might be problems running the script, depending on how you have got to the position you are in. I suggest trying it and see what happens.
If you already have a significant set of flows developed then back that up first.
I don't know if it is the issue but did you run sudo apt install build-essential git
as suggested on the page with the install script.
If it is not that then I think you have to downgrade nodejs from the unsupported version 13 that you currently have.
If you initially ran the upgrade script then how did you get to nodejs 13?
ran node-red-start and got the following error message
12 Apr 21:48:41 - [warn] [node-red-node-serialport/serialport] Error: The module '/home/pi/.node-red/node_modules/@serialport/bindings/build/Release/bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 79. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
""""terminal displays """"""
Stop Node-RED ✔
Remove old version of Node-RED ✔
Remove old version of Node.js -
Leave existing Node.js - Node v13.11.0 Npm 6.14.4
Clean npm cache -
Install Node-RED core ✔ 1.0.4
Move global nodes to local -
Install extra Pi nodes ✔
Npm rebuild existing nodes -
Add shortcut commands ✔
I note that it says
Remove old version of Node.js -
then says
Leave existing Node.js - Node v13.11.0 Npm 6.14.4
bit confusing Is it removing or leaving
I have done the similar on ubuntu systems and had no problems.
Hugh
It means that it would remove any nodejs older than 8.x, otherwise it leaves the current version on the assumption that you intentionally installed a later version.
thanks.
I note that node red running under ubuntu has node v 12.16.2
I have a terminal running on rpi node 12.16.2. and running the serial port node.
in the palette it is displaying the serial app with a red triangle so i tried to uninstall it. it came up with an error Failed to remove: node-red-node-serialport I note on the command line on the terminal which node red is running in indicated it had been removed but palette seem to think its there but uninstallable,
So recap
running Node 12.16.2
palette shows serial port installed with red triangle after a remove request (it was there before request)
command line indicated it was removed.
palette will not allow removal.
modules not now in /home/pi/.node-red/node_modules so have been removed but palette does not recognise that
Is this after running the upgrade script? You haven't made that clear.
If you removed the serial port using the command line then you must restart node-red so that node-red will pick up the fact that it has been removed.
I don't understand what you mean by a terminal running the serial port node.