Can't update NodeRed on Pi3

in the .node-red folder there will be a package.json file - this contains a list of all the extra nodes installed (correctly) - and his is where they should all be listed. it should include ncd-... something as that is the node that should pull in ncd-comm - If you do need to install in manually then in the ~/.node-red directory run npm i ncd-red-comm@latest

thanks again for help, I've done it, I've forced it install. I got the same big error log, then it installed, but on node red same exact error.
I don't know if I need to reinstall everything from zero, should I? How to? I'm afraid to loose to remember all odules I have
Can you kindly check all logs?

pi@RaspbFranco:~/.node-red $ npm i ncd-red-comm@latest

> i2c-bus@5.2.2 install /home/pi/.node-red/node_modules/ncd-red-comm/node_modules/i2c-bus
> node-gyp rebuild

make: Entering directory '/home/pi/.node-red/node_modules/ncd-red-comm/node_modules/i2c-bus/build'
  CXX(target) Release/obj.target/i2c/src/i2c.o
  SOLINK_MODULE(target) Release/obj.target/i2c.node
  COPY Release/i2c.node
make: Leaving directory '/home/pi/.node-red/node_modules/ncd-red-comm/node_modules/i2c-bus/build'
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"})

+ ncd-red-comm@1.7.2
added 10 packages from 10 contributors, removed 4 packages, updated 13 packages and audited 1551 packages in 79.621s

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

found 1014 vulnerabilities (618 low, 55 moderate, 339 high, 2 critical)
  run `npm audit fix` to fix them, or `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.
Started Node-RED graphical event wiring tool.
9 Jul 15:35:40 - [info]
Welcome to Node-RED
===================
9 Jul 15:35:40 - [info] Node-RED version: v1.3.5
9 Jul 15:35:40 - [info] Node.js  version: v14.17.2
9 Jul 15:35:40 - [info] Linux 4.19.66-v7+ arm LE
9 Jul 15:35:41 - [info] Loading palette nodes
Initializing HAP-NodeJS v0.9.4...
9 Jul 15:35:51 - [info] Dashboard version 2.30.0 started at /ui
9 Jul 15:35:53 - [warn] ------------------------------------------------------
9 Jul 15:35:53 - [warn] [ncd-red-comm/ncd-comm] 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 64. 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`).
9 Jul 15:35:53 - [warn] [node-red-node-serialport/serialport] Error: The module '/home/pi/.node-red/node_modules/serialport/node_modules/@serialport/bindings/build/Release/bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. 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:6)
9 Jul 15:35:53 - [warn] ------------------------------------------------------
9 Jul 15:35:53 - [info] Settings file  : /home/pi/.node-red/settings.js
9 Jul 15:35:53 - [info] Context store  : 'default' [module=memory]
9 Jul 15:35:53 - [info] User directory : /home/pi/.node-red
9 Jul 15:35:53 - [warn] Projects disabled : editorTheme.projects.enabled=false
9 Jul 15:35:53 - [info] Flows file     : /home/pi/.node-red/flows_RaspbFranco.json
9 Jul 15:35:53 - [info] Server now running at http://127.0.0.1:1880/
9 Jul 15:35:53 - [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 15:35:53 - [info] Waiting for missing types to be registered:
9 Jul 15:35:53 - [info]  - ncd-comm

there is any way to revive my flow without this ncd-comm? ((

The errors related to i2c are not related to ncd-comm.

The startup log shows ncd-comm is complaining about serialport.

In your .node-red directory run npm install serialport

Yes it has fixed the i2c problem which is good... now just the serialport... but it depends if they have a hard requirement on that old version... (and indeed if you need the ncd nodes at all ? )

thank you a lot mates for support, I've installed it, but same error on starting. Here is the log. Any other ideas?

pi@RaspbFranco:~/.node-red $ npm install serialport
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"})

+ serialport@9.2.0
updated 1 package and audited 1552 packages in 58.339s

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

found 1016 vulnerabilities (620 low, 55 moderate, 339 high, 2 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

There is no error, only warnings...

Serial port is installed ↑

on starting I have this:

9 Jul 15:50:43 - [info] Waiting for missing types to be registered:
9 Jul 15:50:43 - [info] - ncd-comm

I've tried to dable on palette the serial port, stop and start node red, no success
How can I register ncd-comm?

ON the palette I have this error:

node-red-node-serialport
0.14.1

    Error: The module '/home/pi/.node-red/node_modules/serialport/node_modules/@serialport/bindings/build/Release/bindings.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 64. 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:6)

@GiovanniG the only important error is earlier in the start log that tells you the actual problem:

9 Jul 15:35:53 - [warn] [ncd-red-comm/ncd-comm] 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 64. 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`).
9 Jul 15:35:53 - [warn] [node-red-node-serialport/serialport] Error: The module '/home/pi/.node-red/node_modules/serialport/node_modules/@serialport/bindings/build/Release/bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. 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:6)
  1. Are you still getting that error?

If yes, then does /home/pi/node_modules/serialport exist? It is possible, from your earlier attempts to install/fix things, you could have ended up with it installed in the wrong location. If that does exist, then:

cd /home/pi
npm remove serialport
cd /home/pi/.node-red
npm install serialport

what does npm list serialport show?

this seems be a good way to find the problem. I was able to uninstall serialport from palette, but it wasn't enogh, check here:

pi@RaspbFranco:~ $ npm list serialport
/home/pi
└── (empty)

pi@RaspbFranco:~ $ cd .node-red
pi@RaspbFranco:~/.node-red $ npm list serialport
node-red-project@0.0.1 /home/pi/.node-red
└─┬ ncd-red-comm@1.7.2
  └── serialport@7.1.5

pi@RaspbFranco:~/.node-red $ npm uninstall serialport
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"})

audited 1526 packages in 46.462s

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

found 1012 vulnerabilities (616 low, 55 moderate, 339 high, 2 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
pi@RaspbFranco:~/.node-red $ npm list serialport
node-red-project@0.0.1 /home/pi/.node-red
└─┬ ncd-red-comm@1.7.2
  └── serialport@7.1.5

I still can't uninstall it, I need to do it forcely, how?

Personally, I would uninstall ncd-red-comm - i think this is supposed to be a dependency of other ncd nodes. In fact, I would uninstall all ncd type nodes that you can find listed in your package.json and present in node_modules folder...

npm uninstall ncd-red-comm (and any other ncd nodes)

Then install only the ones you need - 1 by 1, checking that node-red starts up each time.

1 Like

thanks, look at this it's interesting:

pi@RaspbFranco:~/.node-red $ npm uninstall ncd-comm
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"})

removed 17 packages and audited 1475 packages in 44.806s

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

found 1008 vulnerabilities (612 low, 55 moderate, 339 high, 2 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
pi@RaspbFranco:~/.node-red $ npm install ncd-comm
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/ncd-comm - Not found
npm ERR! 404
npm ERR! 404  'ncd-comm@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

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

I was able to remove it, but I can't install it back. what differences are between ncd-red-comm and ncd-comm. Maybe the module ADS1115 is old and use old modules, I've removed it from flow but I can't uninstall ADS1115 module on palette as well as ncd-comm, it says modules not found (of coure I've removed them, but why NR didn't got it?
What can I do now? How can I remove it manually from palette? Thanks
They are no ore in use, but can't remove
immagine

It's npm uninstall ncd-red-comm what you typed was incorrect

please check the logs I posted, ncd-comm is what I remoed and it said:
** ```
npm uninstall ncd-comm
removed 17 packages and audited 1475 packages in 44.806s

but later also ```
npm ERR! 404 Not Found - GET https://registry.npmjs.org/ncd-comm - Not found

NR on start reports ncd-comm (not `ncd-red-comm) as missing,
I need to pure out NR from these 2 modules (ncd-comm and ADS1115), how can I do it? Should I manually delete text on json file?
Thank you

If you are not planning to use those nodes then you can do the following:

node-red-stop
node-red --safe

This will start Node-RED in safe mode - which means it starts without running your flows.

You can then open the editor, find and delete the nodes and hit deploy. If will then start your flows normally.

1 Like

I've uninstalled ncd-red-comm (nothing was removed) and installed again (nothing was added), I have these errors as log, I don't know what is going wrong here. On Palette I don't see more ncd-red-comm

pi@RaspbFranco:~/.node-red $ npm uninstall ncd-red-comm
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"})

audited 1475 packages in 44.194s

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

found 1008 vulnerabilities (612 low, 55 moderate, 339 high, 2 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
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-09T14_06_14_256Z-debug.log

I've pasted this on terminal: node-red --safe but is don't see any difference than start, the flows is always present but not running, as before because missing ncd-comm:
Now ADS1115 is removed, at least that.
I don't kno how to install back ncd-red-comm
should I need to delete manually /home/pi/.node-red/node_modules/@serialport/ ?

It looks like you have a very old version of node-gyp installed - that's the module that helps build binary modules like serialport.

Run npm install -g node-gyp then retry the install.

thank you,
Should I run it with root priviledges? Should I run it in node red folder?

pi@RaspbFranco:~/.node-red $ npm install -g node-gyp
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR!  [Error: EACCES: permission denied, access '/usr/lib/node_modules'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

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