I wonder whether your node-gyp cache is corrupted. Delete the folder /home/pi/.cache/node-gyp and run npm install again (from the .node-red folder as before).
That does not make sense, last time you said that after removing the node_modules folder:
But now it says that it was all up to date., which suggests there were no errors last time.
Can you do that again please, remove the node_modules folder and run
npm install
and make sure there are no errors shown in the command window
If that is ok then try
npm install node-red-contrib-onvif
and see if that gives errors in the command window.
how do i completely remove node red and reinstall ?
What command is that from?
npm install
That depends on how you installed it.
What do these commands show
which node-red
apt policy node-red
which node
apt policy nodejs
which npm
apt policy npm
pi@raspberrypi:~ $ which node-red
/usr/bin/node-red
pi@raspberrypi:~ $ apt policy node-red
N: Unable to locate package node-red
pi@raspberrypi:~ $ which node
/usr/bin/node
pi@raspberrypi:~ $ apt policy nodejs
nodejs:
Installed: 20.19.1-1nodesource1
Candidate: 20.19.1-1nodesource1
Version table:
*** 20.19.1-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
100 /var/lib/dpkg/status
20.19.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.18.3-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.18.2-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.18.1-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.18.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.17.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.16.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.15.1-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.15.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.14.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.13.1-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.13.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.12.2-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.12.1-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.12.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.11.1-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.11.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.10.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.9.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.8.1-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.8.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.7.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.6.1-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.6.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.5.1-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.5.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.4.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.3.1-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.3.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.2.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.1.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
20.0.0-1nodesource1 500
500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
12.22.12~dfsg-1~deb11u7 500
500 Index of /raspbian bullseye/main armhf Packages
pi@raspberrypi:~ $ which npm
/usr/bin/npm
pi@raspberrypi:~ $ apt policy npm
npm:
Installed: (none)
Candidate: 7.5.2+ds-2
Version table:
7.5.2+ds-2 500
500 Index of /raspbian bullseye/main armhf Packages
bash <(curl -sL https://github.com/node-red/linux-installers/releases/latest/download/update-nodejs-and-nodered-deb)
That all looks exactly as it should.
To remove nodejs and node-red
sudo apt remove nodejs
Remove or at least rename the .node-red folder. If you want to be able to recover your flows file then rename it for the moment.
Rerun the bash <(curl... script to remove node-red and re-install it and nodejs.
just done this and am running the bash script
thanks
martin
Make sure there are no errors from the script.
I removed it and installed it with the script with no errors at all ,
imported my saved flows etc.
tried installing onvif it failed again, so giving up with onvif lol not worth my sanity .
installed persist for a graph I have but when i deployed persist server lost connection and node red would not start so had to go to node modules and delete persist folder to be able to get node red to start.
just my luck lol
martin
Odd, it installs for me on a very similar system. I suspect there is something wrong with your system which will bite you at some point. Does the serial node install ok? node-red-node-serialport? If not then there is something wrong with your build tools, but I have no idea what.
You might like to try this onvif package, which works well for me and is used by others here GitHub - bartbutenaers/node-red-contrib-onvif-nodes: Node Red nodes for communicating with OnVif compliant IP devices
It hasn't been published to npm so you have to install from the command line (in your .node-red folder), using the command in the link I posted.
That is not a good way to recover. npm will probably re-install it for you when you don't expect it. You can start node-red in safe mode, which starts the editor but not the flows, by stopping node red then running
node-red --safe
Remove the node using the palette manager and then deploy and it will start the flows.
Alternatively remove it from the command line using
npm remove whatever_the_node_is_called
then restart node-red.
thanks for the help
martin
that worked first time thanks,
i already have the node-red-node-serialport installed ,
who says you cant teach an old dog new tricks ,
thanks for all the help and your time its appreciated
martin
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

