Can't update NodeRed on Pi3

It is a global module (-g) - so yes, run it with sudo:

sudo npm install -g node-gyp

I've done it, it updated but not solved the problem, kindly check the log, thanks

pi@RaspbFranco:~/.node-red $ sudo npm install -g node-gyp
/usr/bin/node-gyp -> /usr/lib/node_modules/node-gyp/bin/node-gyp.js
+ node-gyp@8.1.0
added 91 packages from 30 contributors in 13.705s
pi@RaspbFranco:~/.node-red $ npm install ncd-red-comm

> @serialport/bindings@2.0.8 install /home/pi/.node-red/node_modules/@serialport/bindings
> prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=14.17.2 runtime=node arch=arm libc= platform=linux)
make: Entering directory '/home/pi/.node-red/node_modules/@serialport/bindings/build'
  CXX(target) Release/obj.target/bindings/src/serialport.o
../src/serialport.cpp: In function ‘void EIO_AfterGet(uv_work_t*)’:
../src/serialport.cpp:329:96: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::FactoryBase<v8::Boolean>::return_t)’
     results->Set(Nan::New<v8::String>("cts").ToLocalChecked(), Nan::New<v8::Boolean>(data->cts));
                                                                                                ^
In file included from /home/pi/.cache/node-gyp/14.17.2/include/node/node.h:67:0,
                 from ../node_modules/nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/14.17.2/include/node/v8.h:3670:37: note: candidate: v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                     ^~~
/home/pi/.cache/node-gyp/14.17.2/include/node/v8.h:3670:37: note:   candidate expects 3 arguments, 2 provided
/home/pi/.cache/node-gyp/14.17.2/include/node/v8.h:3673:37: note: candidate: v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                     ^~~
/home/pi/.cache/node-gyp/14.17.2/include/node/v8.h:3673:37: note:   candidate expects 3 arguments, 2 provided
../src/serialport.cpp:330:96: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::FactoryBase<v8::Boolean>::return_t)’
     results->Set(Nan::New<v8::String>("dsr").ToLocalChecked(), Nan::New<v8::Boolean>(data->dsr));
                                                                                                ^
In file included from /home/pi/.cache/node-gyp/14.17.2/include/node/node.h:67:0,
                 from ../node_modules/nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/14.17.2/include/node/v8.h:3670:37: note: candidate: v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                     ^~~
/home/pi/.cache/node-gyp/14.17.2/include/node/v8.h:3670:37: note:   candidate expects 3 arguments, 2 provided
/home/pi/.cache/node-gyp/14.17.2/include/node/v8.h:3673:37: note: candidate: v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                     ^~~
/home/pi/.cache/node-gyp/14.17.2/include/node/v8.h:3673:37: note:   candidate expects 3 arguments, 2 provided
../src/serialport.cpp:331:96: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::FactoryBase<v8::Boolean>::return_t)’
     results->Set(Nan::New<v8::String>("dcd").ToLocalChecked(), Nan::New<v8::Boolean>(data->dcd));
                                                                                                ^
In file included from /home/pi/.cache/node-gyp/14.17.2/include/node/node.h:67:0,
                 from ../node_modules/nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/14.17.2/include/node/v8.h:3670:37: note: candidate: v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                     ^~~
/home/pi/.cache/node-gyp/14.17.2/include/node/v8.h:3670:37: note:   candidate expects 3 arguments, 2 provided
/home/pi/.cache/node-gyp/14.17.2/include/node/v8.h:3673:37: note: candidate: v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                     ^~~
/home/pi/.cache/node-gyp/14.17.2/include/node/v8.h:3673:37: note:   candidate expects 3 arguments, 2 provided
../src/serialport.cpp: In function ‘void EIO_AfterGetBaudRate(uv_work_t*)’:
../src/serialport.cpp:378:106: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
     results->Set(Nan::New<v8::String>("baudRate").ToLocalChecked(), Nan::New<v8::Integer>(data->baudRate));
                                                                                                          ^
In file included from /home/pi/.cache/node-gyp/14.17.2/include/node/node.h:67:0,
                 from ../node_modules/nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/14.17.2/include/node/v8.h:3670:37: note: candidate: v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                     ^~~
/home/pi/.cache/node-gyp/14.17.2/include/node/v8.h:3670:37: note:   candidate expects 3 arguments, 2 provided
/home/pi/.cache/node-gyp/14.17.2/include/node/v8.h:3673:37: note: candidate: v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                     ^~~
/home/pi/.cache/node-gyp/14.17.2/include/node/v8.h:3673:37: note:   candidate expects 3 arguments, 2 provided
bindings.target.mk:112: recipe for target 'Release/obj.target/bindings/src/serialport.o' failed
make: *** [Release/obj.target/bindings/src/serialport.o] Error 1
make: Leaving directory '/home/pi/.node-red/node_modules/@serialport/bindings/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:375:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 4.19.66-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/.node-red/node_modules/@serialport/bindings
gyp ERR! node -v v14.17.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @serialport/bindings@2.0.8 install: `prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @serialport/bindings@2.0.8 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2021-07-09T15_33_33_588Z-debug.log
pi@RaspbFranco:~/.node-red $ node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.251:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use   node-red-stop                          to stop Node-RED
Use   node-red-start                         to start Node-RED again
Use   node-red-log                           to view the recent log output
Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
Started Node-RED graphical event wiring tool.
9 Jul 18:33:51 - [info]
Welcome to Node-RED
===================
9 Jul 18:33:51 - [info] Node-RED version: v1.3.5
9 Jul 18:33:51 - [info] Node.js  version: v14.17.2
9 Jul 18:33:51 - [info] Linux 4.19.66-v7+ arm LE
9 Jul 18:33:52 - [info] Loading palette nodes
Initializing HAP-NodeJS v0.9.4...
9 Jul 18:34:02 - [info] Dashboard version 2.30.0 started at /ui
9 Jul 18:34:03 - [info] Settings file  : /home/pi/.node-red/settings.js
9 Jul 18:34:03 - [info] Context store  : 'default' [module=memory]
9 Jul 18:34:03 - [info] User directory : /home/pi/.node-red
9 Jul 18:34:03 - [warn] Projects disabled : editorTheme.projects.enabled=false
9 Jul 18:34:03 - [info] Flows file     : /home/pi/.node-red/flows_RaspbFranco.json
9 Jul 18:34:04 - [info] Server now running at http://127.0.0.1:1880/
9 Jul 18:34:04 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
9 Jul 18:34:04 - [info] Waiting for missing types to be registered:
9 Jul 18:34:04 - [info]  - ncd-comm

on folder @serialport I don't have suche path: ```
'/home/pi/.node-red/node_modules/@serialport/bindings/build'

![immagine|369x186](upload://kDRB4b8t0TDouZQYJywLU9qcTQI.png)
For some reasons I can't paste more here images :(

nonce

Trying to fixing myself (I've already wasted some hours, I'm dubting if it was better to reinstall Node red from zero), I've launched node-gyp rebuild

ANd I have this result, unbelievable:

pi@RaspbFranco:~/.node-red $ node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@8.1.0
gyp info using node@14.17.2 | linux | arm
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - executable path is "/usr/bin/python3"
gyp ERR! find Python - version is "3.5.3"
gyp ERR! find Python - version is 3.5.3 - should be >=3.6.0
gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - executable path is "/usr/bin/python"
gyp ERR! find Python - version is "2.7.13"
gyp ERR! find Python - version is 2.7.13 - should be >=3.6.0
gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
gyp ERR! find Python   (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack     at PythonFinder.fail (/usr/lib/node_modules/node-gyp/lib/find-python.js:330:47)
gyp ERR! stack     at PythonFinder.runChecks (/usr/lib/node_modules/node-gyp/lib/find-python.js:159:21)
gyp ERR! stack     at PythonFinder.<anonymous> (/usr/lib/node_modules/node-gyp/lib/find-python.js:266:16)
gyp ERR! stack     at PythonFinder.execFileCallback (/usr/lib/node_modules/node-gyp/lib/find-python.js:297:7)
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:310:7)
gyp ERR! stack     at ChildProcess.emit (events.js:375:28)
gyp ERR! stack     at maybeClose (internal/child_process.js:1055:16)
gyp ERR! stack     at Socket.<anonymous> (internal/child_process.js:441:11)
gyp ERR! stack     at Socket.emit (events.js:375:28)
gyp ERR! stack     at Pipe.<anonymous> (net.js:675:12)
gyp ERR! System Linux 4.19.66-v7+
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pi/.node-red
gyp ERR! node -v v14.17.2
gyp ERR! node-gyp -v v8.1.0
gyp ERR! not ok
pi@RaspbFranco:~/.node-red $

This morning I've launched sudo apt update and sudo apt full-upgrade, all seems to be updated.
The command node-gyp rebuild was wotking correctly after th update. Why not more now? Crazy

Unfortunately, just because you have the latest available from the raspbian repositories, that doesn't mean you have the latest available.

This is why our install script exists - because the version of node.js included in raspbian is old and doesn't include npm by default.

What version of raspbian have you got? Sorry but I can't remember off the top of my head how to check. It may be you're on an older distribution - looking at the docs I can see the current stable raspbian has python 3.7 at least - not the 3.5 your reports.

At this point, if you wanted to start from a clean point, make sure you backup the all of the .json files in ~/.node-red - you flow file, credential file and package.json.

PLease help me, I don't know why world of rasberry getting so complicated! I have an old distro yes, I've discovered it now! Running sudo apt update and sudo apt dist-upgrade gave me nothing! Why? My version is from 2019!
How do I update to the version 2021? Crazy..
Somebody suggested to update firmare, but I'm aware to make another disaster today, what can I do?


pi@RaspbFranco:~ $ sudo rpi-update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** Performing self-update
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 18764  100 18764    0     0  82654      0 --:--:-- --:--:-- --:--:-- 83026
 *** Relaunching after update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** We're running for the first time
 *** Backing up files (this will take a few minutes)
 *** Backing up firmware
 *** Backing up modules 4.19.66-v7+
#############################################################
WARNING: This update bumps to rpi-5.10.y linux tree
See: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=288234
'rpi-update' should only be used if there is a specific
reason to do so - for example, a request by a Raspberry Pi
engineer or if you want to help the testing effort
and are comfortable with restoring if there are regressions.

DO NOT use 'rpi-update' as part of a regular update process.

##############################################################
Would you like to proceed? (y/N)

I've changed the repository.. ```
deb Index of /raspbian buster main contrib non-free rpi

Should I reinstall nodejs and node red?

not unless you have updated the rest of it to buster first... what does cat /etc/issue report ?
If 9 then you can upgrade to Buster ok - if 8 then you will need to go to 9 (Stretch) first then Buster .

at this point as you said it may be quicker to start over - but please backup up all your files in the ~/.node-red directory first at @knolleary suggested.

I am upgrading now, it reports Raspbian GNU/Linux 10 \n \l
I hope all is ok. So I'll wait it finish, I'll clean installation files, I'll reboot. Then I'll upgrade firmware, uninstall node red and reinstall it.
Should I uninstall/reinstall npm, nodejs and node-gyp? I?m not that expert here.
Thank you

yes - uninstall them - the script should do that but at this point let's not take chances...
The script will then re-install them.

Thanks, I?ve did the distro update, rebooted and still see on the welcome message "Linux RaspbFranco 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l" I don't understand

pi@RaspbFranco:~ $ uname -a
Linux RaspbFranco 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux
it confirms it.
In /etc/apt/sources.list I have buster and I can't update the distro now, it's up to date, it's diffict to understand, I'm confused.

Also Python still old, I don't understand what is wrong here.. the process took 45 min, an it's for nothing

here I have

pi@RaspbFranco:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

It tells something else.
pi@RaspbFranco:~ $ python -V
Python 2.7.16
I suppose it's old one, where is 3.5 that I've seen hundred of times during distro update? I can't understan why today it's so bad..

Try python3 -v
So you have gone a sudo apt full-upgrade. And a sudo rpi-update. And rebooted ?
Removed nodejs. Then run the Node-RED install script with —node14 ?

I got that to see the new version I need to update "firmware".. which is actually kernel I suppose, what, they made me confused with such terms. I did and I see now 5.10 or something like that.
I've no clue how to uninstall nodejs, I've read around, I can't find thse folders, I've used nvm uninstall (and specified the version installed), ther eis nothing to do. I surrender. All day try to fix some stupid errors..

I've removed manually the node modules folder under node red, leaving only the json file in the root and what was before, I?m reinstalling NR (only), let's see

I still can't run it, I've updated gyp.. now I've also i2c node out of order. I need to find a way to remove completely nodejs but I don't know how. I wasted all day on this problems

pi@RaspbFranco:~/.node-red $ npm install node-red-contrib-i2c

changed 1 package, and audited 1306 packages in 23s

72 packages are looking for funding
  run `npm fund` for details

56 vulnerabilities (22 low, 9 moderate, 23 high, 2 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
pi@RaspbFranco:~/.node-red $ node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.251:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use   node-red-stop                          to stop Node-RED
Use   node-red-start                         to start Node-RED again
Use   node-red-log                           to view the recent log output
Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
9 Jul 22:30:10 - [info]
Welcome to Node-RED
===================
9 Jul 22:30:10 - [info] Node-RED version: v1.3.5
9 Jul 22:30:10 - [info] Node.js  version: v14.17.2
9 Jul 22:30:10 - [info] Linux 5.10.48-v7+ arm LE
9 Jul 22:30:12 - [info] Loading palette nodes
Initializing HAP-NodeJS v0.9.4...
9 Jul 22:30:22 - [info] Dashboard version 2.30.0 started at /ui
9 Jul 22:30:23 - [warn] ------------------------------------------------------
9 Jul 22:30:23 - [warn] [node-red-contrib-i2c/i2c] Error: Could not locate the bindings file. Tried:
 → /home/pi/.node-red/node_modules/node-red-contrib-i2c/node_modules/i2c-bus/build/i2c.node
 → /home/pi/.node-red/node_modules/node-red-contrib-i2c/node_modules/i2c-bus/build/Debug/i2c.node
 → /home/pi/.node-red/node_modules/node-red-contrib-i2c/node_modules/i2c-bus/build/Release/i2c.node
 → /home/pi/.node-red/node_modules/node-red-contrib-i2c/node_modules/i2c-bus/out/Debug/i2c.node
 → /home/pi/.node-red/node_modules/node-red-contrib-i2c/node_modules/i2c-bus/Debug/i2c.node
 → /home/pi/.node-red/node_modules/node-red-contrib-i2c/node_modules/i2c-bus/out/Release/i2c.node
 → /home/pi/.node-red/node_modules/node-red-contrib-i2c/node_modules/i2c-bus/Release/i2c.node
 → /home/pi/.node-red/node_modules/node-red-contrib-i2c/node_modules/i2c-bus/build/default/i2c.node
 → /home/pi/.node-red/node_modules/node-red-contrib-i2c/node_modules/i2c-bus/compiled/14.17.2/linux/arm/i2c.node
 → /home/pi/.node-red/node_modules/node-red-contrib-i2c/node_modules/i2c-bus/addon-build/release/install-root/i2c.node
 → /home/pi/.node-red/node_modules/node-red-contrib-i2c/node_modules/i2c-bus/addon-build/debug/install-root/i2c.node
 → /home/pi/.node-red/node_modules/node-red-contrib-i2c/node_modules/i2c-bus/addon-build/default/install-root/i2c.node
 → /home/pi/.node-red/node_modules/node-red-contrib-i2c/node_modules/i2c-bus/lib/binding/node-v83-linux-arm/i2c.node (line:3)
9 Jul 22:30:23 - [warn] [node-red-node-serialport/serialport] Error: Could not locate the bindings file. Tried:
 → /home/pi/.node-red/node_modules/@serialport/bindings/build/bindings.node
 → /home/pi/.node-red/node_modules/@serialport/bindings/build/Debug/bindings.node
 → /home/pi/.node-red/node_modules/@serialport/bindings/build/Release/bindings.node
 → /home/pi/.node-red/node_modules/@serialport/bindings/out/Debug/bindings.node
 → /home/pi/.node-red/node_modules/@serialport/bindings/Debug/bindings.node
 → /home/pi/.node-red/node_modules/@serialport/bindings/out/Release/bindings.node
 → /home/pi/.node-red/node_modules/@serialport/bindings/Release/bindings.node
 → /home/pi/.node-red/node_modules/@serialport/bindings/build/default/bindings.node
 → /home/pi/.node-red/node_modules/@serialport/bindings/compiled/14.17.2/linux/arm/bindings.node
 → /home/pi/.node-red/node_modules/@serialport/bindings/addon-build/release/install-root/bindings.node
 → /home/pi/.node-red/node_modules/@serialport/bindings/addon-build/debug/install-root/bindings.node
 → /home/pi/.node-red/node_modules/@serialport/bindings/addon-build/default/install-root/bindings.node
 → /home/pi/.node-red/node_modules/@serialport/bindings/lib/binding/node-v83-linux-arm/bindings.node (line:6)
9 Jul 22:30:23 - [warn] ------------------------------------------------------
9 Jul 22:30:23 - [info] Settings file  : /home/pi/.node-red/settings.js
9 Jul 22:30:23 - [info] Context store  : 'default' [module=memory]
9 Jul 22:30:23 - [info] User directory : /home/pi/.node-red
9 Jul 22:30:23 - [warn] Projects disabled : editorTheme.projects.enabled=false
9 Jul 22:30:23 - [info] Flows file     : /home/pi/.node-red/flows_RaspbFranco.json
9 Jul 22:30:24 - [info] Server now running at http://127.0.0.1:1880/
9 Jul 22:30:24 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
9 Jul 22:30:24 - [info] Waiting for missing types to be registered:
9 Jul 22:30:24 - [info]  - ncd-comm
9 Jul 22:30:24 - [info]  - i2c in
9 Jul 22:30:24 - [info]  - i2c out


I've tried everything, really, updated node to 16.. but node red display it 14, I don't know. The probelm is:

pi@RaspbFranco:~/.node-red $ npm install ncd-red-comm
npm ERR! code 1
npm ERR! path /home/pi/.node-red/node_modules/ncd-red-comm/node_modules/@serialport/bindings
npm ERR! command failed
npm ERR! command sh -c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
npm ERR! make: Entering directory '/home/pi/.node-red/node_modules/ncd-red-comm/node_modules/@serialport/bindings/build'
npm ERR!   CXX(target) Release/obj.target/bindings/src/serialport.o
npm ERR! make: Leaving directory '/home/pi/.node-red/node_modules/ncd-red-comm/node_modules/@serialport/bindings/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@16.4.2 | linux | arm
npm ERR! (node:6154) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python2
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/home/pi/.node-red/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/pi/.node-red/node_modules/ncd-red-comm/node_modules/@serialport/bindings/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/pi/.node-red/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/pi/.node-gyp/16.4.2/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/pi/.node-gyp/16.4.2',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/home/pi/.node-red/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/pi/.node-gyp/16.4.2/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/pi/.node-red/node_modules/ncd-red-comm/node_modules/@serialport/bindings',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Open(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:78:69: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR!    uv_queue_work(uv_default_loop(), req, EIO_Open, (uv_after_work_cb)EIO_AfterOpen);
npm ERR!                                                                      ^~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Update(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:135:71: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR!    uv_queue_work(uv_default_loop(), req, EIO_Update, (uv_after_work_cb)EIO_AfterUpdate);
npm ERR!                                                                        ^~~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Close(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:175:70: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR!    uv_queue_work(uv_default_loop(), req, EIO_Close, (uv_after_work_cb)EIO_AfterClose);
npm ERR!                                                                       ^~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Flush(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:215:70: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR!    uv_queue_work(uv_default_loop(), req, EIO_Flush, (uv_after_work_cb)EIO_AfterFlush);
npm ERR!                                                                       ^~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:270:68: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR!    uv_queue_work(uv_default_loop(), req, EIO_Set, (uv_after_work_cb)EIO_AfterSet);
npm ERR!                                                                     ^~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Get(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:314:68: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR!    uv_queue_work(uv_default_loop(), req, EIO_Get, (uv_after_work_cb)EIO_AfterGet);
npm ERR!                                                                     ^~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘void EIO_AfterGet(uv_work_t*)’:
npm ERR! ../src/serialport.cpp:329:96: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::FactoryBase<v8::Boolean>::return_t)’
npm ERR!      results->Set(Nan::New<v8::String>("cts").ToLocalChecked(), Nan::New<v8::Boolean>(data->cts));
npm ERR!                                                                                                 ^
npm ERR! In file included from /home/pi/.node-gyp/16.4.2/include/node/node.h:63,
npm ERR!                  from ../../../nan/nan.h:56,
npm ERR!                  from ../src/./serialport.h:6,
npm ERR!                  from ../src/serialport.cpp:1:
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3945:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!    V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                      ^~~
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3945:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3948:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!    V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                      ^~~
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3948:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/serialport.cpp:330:96: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::FactoryBase<v8::Boolean>::return_t)’
npm ERR!      results->Set(Nan::New<v8::String>("dsr").ToLocalChecked(), Nan::New<v8::Boolean>(data->dsr));
npm ERR!                                                                                                 ^
npm ERR! In file included from /home/pi/.node-gyp/16.4.2/include/node/node.h:63,
npm ERR!                  from ../../../nan/nan.h:56,
npm ERR!                  from ../src/./serialport.h:6,
npm ERR!                  from ../src/serialport.cpp:1:
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3945:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!    V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                      ^~~
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3945:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3948:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!    V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                      ^~~
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3948:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/serialport.cpp:331:96: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::FactoryBase<v8::Boolean>::return_t)’
npm ERR!      results->Set(Nan::New<v8::String>("dcd").ToLocalChecked(), Nan::New<v8::Boolean>(data->dcd));
npm ERR!                                                                                                 ^
npm ERR! In file included from /home/pi/.node-gyp/16.4.2/include/node/node.h:63,
npm ERR!                  from ../../../nan/nan.h:56,
npm ERR!                  from ../src/./serialport.h:6,
npm ERR!                  from ../src/serialport.cpp:1:
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3945:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!    V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                      ^~~
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3945:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3948:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!    V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                      ^~~
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3948:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE GetBaudRate(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:363:76: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR!    uv_queue_work(uv_default_loop(), req, EIO_GetBaudRate, (uv_after_work_cb)EIO_AfterGetBaudRate);
npm ERR!                                                                             ^~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘void EIO_AfterGetBaudRate(uv_work_t*)’:
npm ERR! ../src/serialport.cpp:378:106: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
npm ERR!      results->Set(Nan::New<v8::String>("baudRate").ToLocalChecked(), Nan::New<v8::Integer>(data->baudRate));
npm ERR!                                                                                                           ^
npm ERR! In file included from /home/pi/.node-gyp/16.4.2/include/node/node.h:63,
npm ERR!                  from ../../../nan/nan.h:56,
npm ERR!                  from ../src/./serialport.h:6,
npm ERR!                  from ../src/serialport.cpp:1:
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3945:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!    V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                      ^~~
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3945:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3948:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!    V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                      ^~~
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3948:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Drain(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:409:70: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR!    uv_queue_work(uv_default_loop(), req, EIO_Drain, (uv_after_work_cb)EIO_AfterDrain);
npm ERR!                                                                       ^~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: At global scope:
npm ERR! ../src/serialport.cpp:430:28: warning: unnecessary parentheses in declaration of ‘ToParityEnum’ [-Wparentheses]
npm ERR!  SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) {
npm ERR!                             ^
npm ERR! ../src/serialport.cpp:449:30: warning: unnecessary parentheses in declaration of ‘ToStopBitEnum’ [-Wparentheses]
npm ERR!  SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) {
npm ERR!                               ^
npm ERR! In file included from ../../../nan/nan.h:56,
npm ERR!                  from ../src/./serialport.h:6,
npm ERR!                  from ../src/serialport.cpp:1:
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/node.h:806:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
npm ERR!        (node::addon_register_func) (regfunc),                          \
npm ERR!                                            ^
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/node.h:840:3: note: in expansion of macro ‘NODE_MODULE_X’
npm ERR!    NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
npm ERR!    ^~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp:483:1: note: in expansion of macro ‘NODE_MODULE’
npm ERR!  NODE_MODULE(serialport, init);
npm ERR!  ^~~~~~~~~~~
npm ERR! make: *** [bindings.target.mk:114: Release/obj.target/bindings/src/serialport.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/home/pi/.node-red/node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 5.10.48-v7+
npm ERR! gyp ERR! command "/home/pi/.nvm/versions/node/v16.4.2/bin/node" "/home/pi/.node-red/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /home/pi/.node-red/node_modules/ncd-red-comm/node_modules/@serialport/bindings
npm ERR! gyp ERR! node -v v16.4.2
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2021-07-09T19_43_43_714Z-debug.log

to remove nodejs you should be able to sudo npm purge nodejs then try node -v to check it has gone. But frm above it looks like tat is now the right level - so just need to get i2c back into shape. Can you copy your ~/.node-red/package.json file here so we can try to tidy that up.

Yes sure, thanks for help,
sudo npm purge nodej givesUnknown command: "purge"

{
  "name": "node-red-project",
  "description": "A Node-RED Project",
  "version": "0.0.1",
  "dependencies": {
    "foo": "0.0.7",
    "lcdi2c": "^1.0.6",
    "node-red-contrib-alexa-remote2-v2": "~3.10.5",
    "node-red-contrib-binary": "~0.1.3",
    "node-red-contrib-bravia": "~1.2.0",
    "node-red-contrib-config": "~1.2.1",
    "node-red-contrib-denon": "~0.1.5",
    "node-red-contrib-email-out": "~0.1.1",
    "node-red-contrib-homekit-bridged": "~1.3.5",
    "node-red-contrib-ibm-watson-iot": "^0.2.8",
    "node-red-contrib-lcd20x4-i2c": "~0.1.1",
    "node-red-contrib-mqtt-broker": "~0.2.5",
    "node-red-contrib-play-audio": "^2.5.0",
    "node-red-contrib-simpletime": "~2.10.0",
    "node-red-contrib-smartnora": "~1.0.11",
    "node-red-contrib-telegrambot": "~9.5.0",
    "node-red-contrib-timerswitch": "~1.3.0",
    "node-red-contrib-virtual-smart-home": "~2.11.0",
    "node-red-dashboard": "~2.30.0",
    "node-red-node-email": "~1.12.2",
    "node-red-node-pi-gpio": "^1.2.3",
    "node-red-node-ping": "^0.3.1",
    "node-red-node-random": "^0.4.0",
    "node-red-node-rbe": "~0.5.0",
    "node-red-node-serialport": "^0.14.1",
    "node-red-node-smooth": "^0.1.2",
    "node-red-node-tail": "~0.3.1"
  }
}

Sorry - I was mixing my installers - it would be sudo apt purge nodejs (but don't do that yet)..
Edit that package.json and remove the foo, lcdi2c and node-red-contrib-lcd20x4-i2c lines
(and the ibm-watson one is somewhat out of date also so if you don't need it remove that as well)
Then - rm package-lock.json and rm -r node_modules/ then npm cache clean --force - and finally npm install

Ive followed your instructions, nothing to do, you may see in the log everything. No chance to get out here. In my opinion is related to those errors, what can I do?

pi@RaspbFranco:~/.node-red $ sudo npm purge nodejs
Unknown command: "purge"

To see a list of supported npm commands, run:
  npm help
pi@RaspbFranco:~/.node-red $ npm update && npm rebuild
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile

pi@RaspbFranco:~/.node-red $ ^C
pi@RaspbFranco:~/.node-red $ npm update && npm rebuild
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated mailcomposer@2.1.0: This project is unmaintained
npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated nodemailer@1.11.0: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/

pi@RaspbFranco:~/.node-red $ ^C
pi@RaspbFranco:~/.node-red $ rm package-lock.json
pi@RaspbFranco:~/.node-red $ rm -r node_modules/
pi@RaspbFranco:~/.node-red $ npm cache clean --force
npm WARN using --force Recommended protections disabled.
pi@RaspbFranco:~/.node-red $ npm install
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated mailcomposer@2.1.0: This project is unmaintained
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated querystring@0.2.1: The
npm WARN deprecated mimelib@0.3.1: This project is unmaintained
npm WARN deprecated buildmail@2.0.0: This project is unmaintained
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated uuid@2.0.3: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated nodemailer@1.11.0: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated node-red-contrib-mqtt-broker@0.2.5: deprecated
npm WARN deprecated mailparser@0.6.2: Mailparser versions older than v2.3.0 are deprecated
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated bson@0.4.23: Fixed a critical issue with BSON serialization documented in CVE-2019-2391, see https://bit.ly/2KcpXdo for more details
npm WARN deprecated mongodb@2.1.21: Please upgrade to 2.2.19 or higher

added 704 packages, and audited 744 packages in 6m

55 packages are looking for funding
  run `npm fund` for details

25 vulnerabilities (2 low, 6 moderate, 15 high, 2 critical)

To address issues that do not require attention, run:
  npm audit fix

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
pi@RaspbFranco:~/.node-red $ node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.251:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use   node-red-stop                          to stop Node-RED
Use   node-red-start                         to start Node-RED again
Use   node-red-log                           to view the recent log output
Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
9 Jul 23:04:29 - [info]
Welcome to Node-RED
===================
9 Jul 23:04:29 - [info] Node-RED version: v1.3.5
9 Jul 23:04:29 - [info] Node.js  version: v14.17.2
9 Jul 23:04:29 - [info] Linux 5.10.48-v7+ arm LE
9 Jul 23:04:31 - [info] Loading palette nodes
Initializing HAP-NodeJS v0.9.4...
9 Jul 23:04:45 - [info] Dashboard version 2.30.0 started at /ui
9 Jul 23:04:46 - [warn] Missing node modules:
9 Jul 23:04:46 - [warn]  - node-red-contrib-ibm-watson-iot (0.2.8): wiotp-credentials, wiotp in, wiotp out
9 Jul 23:04:46 - [warn]  - node-red-contrib-lcd20x4-i2c (0.1.1): LCD20x4-I2C
9 Jul 23:04:46 - [warn]  - node-red-node-serialport (0.14.1): serial in, serial out, serial request, serial-port
9 Jul 23:04:46 - [info] Removing modules from config
9 Jul 23:04:46 - [info] Settings file  : /home/pi/.node-red/settings.js
9 Jul 23:04:46 - [info] Context store  : 'default' [module=memory]
9 Jul 23:04:46 - [info] User directory : /home/pi/.node-red
9 Jul 23:04:46 - [warn] Projects disabled : editorTheme.projects.enabled=false
9 Jul 23:04:46 - [info] Flows file     : /home/pi/.node-red/flows_RaspbFranco.json
9 Jul 23:04:47 - [info] Server now running at http://127.0.0.1:1880/
9 Jul 23:04:47 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
9 Jul 23:04:48 - [info] Waiting for missing types to be registered:
9 Jul 23:04:48 - [info]  - ncd-comm
9 Jul 23:04:48 - [info]  - LCD20x4-I2C
9 Jul 23:04:48 - [info]  - i2c in
9 Jul 23:04:48 - [info]  - i2c out
^C
pi@RaspbFranco:~/.node-red $ node-red-stop

Stop Node-RED

Use   node-red-start   to start Node-RED again

pi@RaspbFranco:~/.node-red $ npm install ncd-red-comm
npm ERR! code 1
npm ERR! path /home/pi/.node-red/node_modules/@serialport/bindings
npm ERR! command failed
npm ERR! command sh -c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
npm ERR! make: Entering directory '/home/pi/.node-red/node_modules/@serialport/bindings/build'
npm ERR!   CXX(target) Release/obj.target/bindings/src/serialport.o
npm ERR! make: Leaving directory '/home/pi/.node-red/node_modules/@serialport/bindings/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@16.4.2 | linux | arm
npm ERR! (node:16144) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python2
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/home/pi/.node-red/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/pi/.node-red/node_modules/@serialport/bindings/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/pi/.node-red/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/pi/.node-gyp/16.4.2/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/pi/.node-gyp/16.4.2',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/home/pi/.node-red/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/pi/.node-gyp/16.4.2/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/pi/.node-red/node_modules/@serialport/bindings',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Open(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:78:69: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR!    uv_queue_work(uv_default_loop(), req, EIO_Open, (uv_after_work_cb)EIO_AfterOpen);
npm ERR!                                                                      ^~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Update(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:135:71: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR!    uv_queue_work(uv_default_loop(), req, EIO_Update, (uv_after_work_cb)EIO_AfterUpdate);
npm ERR!                                                                        ^~~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Close(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:175:70: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR!    uv_queue_work(uv_default_loop(), req, EIO_Close, (uv_after_work_cb)EIO_AfterClose);
npm ERR!                                                                       ^~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Flush(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:215:70: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR!    uv_queue_work(uv_default_loop(), req, EIO_Flush, (uv_after_work_cb)EIO_AfterFlush);
npm ERR!                                                                       ^~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:270:68: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR!    uv_queue_work(uv_default_loop(), req, EIO_Set, (uv_after_work_cb)EIO_AfterSet);
npm ERR!                                                                     ^~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Get(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:314:68: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR!    uv_queue_work(uv_default_loop(), req, EIO_Get, (uv_after_work_cb)EIO_AfterGet);
npm ERR!                                                                     ^~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘void EIO_AfterGet(uv_work_t*)’:
npm ERR! ../src/serialport.cpp:329:96: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::FactoryBase<v8::Boolean>::return_t)’
npm ERR!      results->Set(Nan::New<v8::String>("cts").ToLocalChecked(), Nan::New<v8::Boolean>(data->cts));
npm ERR!                                                                                                 ^
npm ERR! In file included from /home/pi/.node-gyp/16.4.2/include/node/node.h:63,
npm ERR!                  from ../node_modules/nan/nan.h:56,
npm ERR!                  from ../src/./serialport.h:6,
npm ERR!                  from ../src/serialport.cpp:1:
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3945:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!    V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                      ^~~
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3945:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3948:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!    V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                      ^~~
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3948:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/serialport.cpp:330:96: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::FactoryBase<v8::Boolean>::return_t)’
npm ERR!      results->Set(Nan::New<v8::String>("dsr").ToLocalChecked(), Nan::New<v8::Boolean>(data->dsr));
npm ERR!                                                                                                 ^
npm ERR! In file included from /home/pi/.node-gyp/16.4.2/include/node/node.h:63,
npm ERR!                  from ../node_modules/nan/nan.h:56,
npm ERR!                  from ../src/./serialport.h:6,
npm ERR!                  from ../src/serialport.cpp:1:
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3945:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!    V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                      ^~~
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3945:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3948:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!    V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                      ^~~
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3948:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/serialport.cpp:331:96: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::FactoryBase<v8::Boolean>::return_t)’
npm ERR!      results->Set(Nan::New<v8::String>("dcd").ToLocalChecked(), Nan::New<v8::Boolean>(data->dcd));
npm ERR!                                                                                                 ^
npm ERR! In file included from /home/pi/.node-gyp/16.4.2/include/node/node.h:63,
npm ERR!                  from ../node_modules/nan/nan.h:56,
npm ERR!                  from ../src/./serialport.h:6,
npm ERR!                  from ../src/serialport.cpp:1:
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3945:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!    V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                      ^~~
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3945:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3948:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!    V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                      ^~~
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3948:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE GetBaudRate(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:363:76: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR!    uv_queue_work(uv_default_loop(), req, EIO_GetBaudRate, (uv_after_work_cb)EIO_AfterGetBaudRate);
npm ERR!                                                                             ^~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘void EIO_AfterGetBaudRate(uv_work_t*)’:
npm ERR! ../src/serialport.cpp:378:106: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
npm ERR!      results->Set(Nan::New<v8::String>("baudRate").ToLocalChecked(), Nan::New<v8::Integer>(data->baudRate));
npm ERR!                                                                                                           ^
npm ERR! In file included from /home/pi/.node-gyp/16.4.2/include/node/node.h:63,
npm ERR!                  from ../node_modules/nan/nan.h:56,
npm ERR!                  from ../src/./serialport.h:6,
npm ERR!                  from ../src/serialport.cpp:1:
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3945:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!    V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                      ^~~
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3945:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3948:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!    V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                      ^~~
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/v8.h:3948:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Drain(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:409:70: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR!    uv_queue_work(uv_default_loop(), req, EIO_Drain, (uv_after_work_cb)EIO_AfterDrain);
npm ERR!                                                                       ^~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: At global scope:
npm ERR! ../src/serialport.cpp:430:28: warning: unnecessary parentheses in declaration of ‘ToParityEnum’ [-Wparentheses]
npm ERR!  SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) {
npm ERR!                             ^
npm ERR! ../src/serialport.cpp:449:30: warning: unnecessary parentheses in declaration of ‘ToStopBitEnum’ [-Wparentheses]
npm ERR!  SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) {
npm ERR!                               ^
npm ERR! In file included from ../node_modules/nan/nan.h:56,
npm ERR!                  from ../src/./serialport.h:6,
npm ERR!                  from ../src/serialport.cpp:1:
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/node.h:806:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
npm ERR!        (node::addon_register_func) (regfunc),                          \
npm ERR!                                            ^
npm ERR! /home/pi/.node-gyp/16.4.2/include/node/node.h:840:3: note: in expansion of macro ‘NODE_MODULE_X’
npm ERR!    NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
npm ERR!    ^~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp:483:1: note: in expansion of macro ‘NODE_MODULE’
npm ERR!  NODE_MODULE(serialport, init);
npm ERR!  ^~~~~~~~~~~
npm ERR! make: *** [bindings.target.mk:114: Release/obj.target/bindings/src/serialport.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/home/pi/.node-red/node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 5.10.48-v7+
npm ERR! gyp ERR! command "/home/pi/.nvm/versions/node/v16.4.2/bin/node" "/home/pi/.node-red/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /home/pi/.node-red/node_modules/@serialport/bindings
npm ERR! gyp ERR! node -v v16.4.2
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2021-07-09T20_08_14_024Z-debug.log
pi@RaspbFranco:~/.node-red $ npm install node-red-contrib-i2c

added 5 packages, changed 1 package, and audited 749 packages in 2m

55 packages are looking for funding
  run `npm fund` for details

25 vulnerabilities (2 low, 6 moderate, 15 high, 2 critical)

To address issues that do not require attention, run:
  npm audit fix

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
pi@RaspbFranco:~/.node-red $ npm install node-red-contrib-lcd20x4-i2c

added 1 package, and audited 750 packages in 2m

55 packages are looking for funding
  run `npm fund` for details

25 vulnerabilities (2 low, 6 moderate, 15 high, 2 critical)

To address issues that do not require attention, run:
  npm audit fix

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
pi@RaspbFranco:~/.node-red $ node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.251:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use   node-red-stop                          to stop Node-RED
Use   node-red-start                         to start Node-RED again
Use   node-red-log                           to view the recent log output
Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
9 Jul 23:13:43 - [info]
Welcome to Node-RED
===================
9 Jul 23:13:43 - [info] Node-RED version: v1.3.5
9 Jul 23:13:43 - [info] Node.js  version: v14.17.2
9 Jul 23:13:43 - [info] Linux 5.10.48-v7+ arm LE
9 Jul 23:13:45 - [info] Loading palette nodes
Initializing HAP-NodeJS v0.9.4...
9 Jul 23:13:54 - [info] Dashboard version 2.30.0 started at /ui
9 Jul 23:13:56 - [warn] ------------------------------------------------------
9 Jul 23:13:56 - [warn] [node-red-contrib-i2c/i2c] Error: The module '/home/pi/.node-red/node_modules/i2c-bus/build/Release/i2c.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 93. This version of Node.js requires
NODE_MODULE_VERSION 83. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`). (line:3)
9 Jul 23:13:56 - [warn] ------------------------------------------------------
9 Jul 23:13:56 - [info] Settings file  : /home/pi/.node-red/settings.js
9 Jul 23:13:56 - [info] Context store  : 'default' [module=memory]
9 Jul 23:13:56 - [info] User directory : /home/pi/.node-red
9 Jul 23:13:56 - [warn] Projects disabled : editorTheme.projects.enabled=false
9 Jul 23:13:56 - [info] Flows file     : /home/pi/.node-red/flows_RaspbFranco.json
9 Jul 23:13:56 - [info] Server now running at http://127.0.0.1:1880/
9 Jul 23:13:56 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
9 Jul 23:13:56 - [info] Waiting for missing types to be registered:
9 Jul 23:13:56 - [info]  - ncd-comm
9 Jul 23:13:56 - [info]  - i2c in
9 Jul 23:13:56 - [info]  - i2c out