Problem with Install NodeRed ncd-red-wireless library in Raspberry

Hello everyone!

We are testing new possibilities of device integration, and we have in mind to communicate your wireless devices with a Raspberry using a USB-Modem.

The problem is that when installing the library, it gives me the following error:

lord@raspberrypi:~ $ npm install ncd-red-wireless
npm ERR! code 1
npm ERR! path /home/lord/node_modules/ncd-red-wireless/node_modules/@serialport/ bindings
npm ERR! command failed
npm ERR! command sh -c prebuild-install --tag-prefix @serialport/bindings@ || no de-gyp rebuild
npm ERR! make: se entra en el directorio ‘/home/lord/node_modules/ncd-red-wirele ss/node_modules/@serialport/bindings/build’
npm ERR! CXX(target) Release/obj.target/bindings/src/serialport.o
npm ERR! make: se sale del directorio ‘/home/lord/node_modules/ncd-red-wireless/ node_modules/@serialport/bindings/build’
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.16.0 | linux | arm
npm ERR! gyp info find Python using Python version 3.9.2 found at “/usr/bin/pyth on3”
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args ‘/usr/lib/node_modules/npm/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/lord/node_modules/ncd-red-wireless/node_mo dules/@serialport/bindings/build/config.gypi’,
npm ERR! gyp info spawn args ‘-I’,
npm ERR! gyp info spawn args ‘/usr/lib/node_modules/npm/node_modules/node-gyp/ addon.gypi’,
npm ERR! gyp info spawn args ‘-I’,
npm ERR! gyp info spawn args ‘/home/lord/.cache/node-gyp/16.16.0/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/lord/.cache/node-gyp/16.16 .0’,
npm ERR! gyp info spawn args ‘-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_mo dules/node-gyp’,
npm ERR! gyp info spawn args ‘-Dnode_lib_file=/home/lord/.cache/node-gyp/16.16 .0/<(target_arch)/node.lib’,
npm ERR! gyp info spawn args ‘-Dmodule_root_dir=/home/lord/node_modules/ncd-re d-wireless/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(Na n::NAN_METHOD_ARGS_TYPE)’:
npm ERR! …/src/serialport.cpp:78:51: warning: cast between incompatible functio n types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_wo rk_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
npm ERR! 78 | uv_queue_work(uv_default_loop(), req, EIO_Open, (uv_after_wor k_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:53: warning: cast between incompatible functi on types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_w ork_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
npm ERR! 135 | uv_queue_work(uv_default_loop(), req, EIO_Update, (uv_after_w ork_cb)EIO_AfterUpdate);
npm ERR! | ^~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
npm ERR! …/src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Close(N an::NAN_METHOD_ARGS_TYPE)’:
npm ERR! …/src/serialport.cpp:175:52: warning: cast between incompatible functi on types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_w ork_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
npm ERR! 175 | uv_queue_work(uv_default_loop(), req, EIO_Close, (uv_after_wo rk_cb)EIO_AfterClose);
npm ERR! | ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
npm ERR! …/src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Flush(N an::NAN_METHOD_ARGS_TYPE)’:
npm ERR! …/src/serialport.cpp:215:52: warning: cast between incompatible functi on types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_w ork_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
npm ERR! 215 | uv_queue_work(uv_default_loop(), req, EIO_Flush, (uv_after_wo rk_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:50: warning: cast between incompatible functi on types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_w ork_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
npm ERR! 270 | 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:50: warning: cast between incompatible functi on types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_w ork_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
npm ERR! 314 | 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::Localv8::String, Nan::imp::FactoryBasev8::Boolean::retur n_t)’
npm ERR! 329 | results->Set(Nan::Newv8::String(“cts”).ToLocalChecked(), Nan::Newv8::Boolean(data->cts));
npm ERR! | ^
npm ERR! In file included from /home/lord/.cache/node-gyp/16.16.0/include/node/n ode.h:63,
npm ERR! from …/…/…/…/…/nan/nan.h:60,
npm ERR! from …/src/./serialport.h:6,
npm ERR! from …/src/serialport.cpp:1:
npm ERR! /home/lord/.cache/node-gyp/16.16.0/include/node/v8.h:3961:37: note: can didate: ‘v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Local<v8::V alue>, v8::Localv8::Value)’
npm ERR! 3961 | V8_WARN_UNUSED_RESULT Maybe Set(Local context,
npm ERR! | ^~~
npm ERR! /home/lord/.cache/node-gyp/16.16.0/include/node/v8.h:3961:37: note: c andidate expects 3 arguments, 2 provided
npm ERR! /home/lord/.cache/node-gyp/16.16.0/include/node/v8.h:3964:37: note: can didate: ‘v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::L ocalv8::Value)’
npm ERR! 3964 | V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
npm ERR! | ^~~
npm ERR! /home/lord/.cache/node-gyp/16.16.0/include/node/v8.h:3964:37: note: c andidate expects 3 arguments, 2 provided
npm ERR! …/src/serialport.cpp:330:96: error: no matching function for call to ‘ v8::Object::Set(v8::Localv8::String, Nan::imp::FactoryBasev8::Boolean::retur n_t)’
npm ERR! 330 | results->Set(Nan::Newv8::String(“dsr”).ToLocalChecked(), Nan::Newv8::Boolean(data->dsr));
npm ERR! | ^
npm ERR! In file included from /home/lord/.cache/node-gyp/16.16.0/include/node/n ode.h:63,
npm ERR! from …/…/…/…/…/nan/nan.h:60,
npm ERR! from …/src/./serialport.h:6,
npm ERR! from …/src/serialport.cpp:1:
npm ERR! /home/lord/.cache/node-gyp/16.16.0/include/node/v8.h:3961:37: note: can didate: ‘v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Local<v8::V alue>, v8::Localv8::Value)’
npm ERR! 3961 | V8_WARN_UNUSED_RESULT Maybe Set(Local context,
npm ERR! | ^~~
npm ERR! /home/lord/.cache/node-gyp/16.16.0/include/node/v8.h:3961:37: note: c andidate expects 3 arguments, 2 provided
npm ERR! /home/lord/.cache/node-gyp/16.16.0/include/node/v8.h:3964:37: note: can didate: ‘v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::L ocalv8::Value)’
npm ERR! 3964 | V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
npm ERR! | ^~~
npm ERR! /home/lord/.cache/node-gyp/16.16.0/include/node/v8.h:3964:37: note: c andidate expects 3 arguments, 2 provided
npm ERR! …/src/serialport.cpp:331:96: error: no matching function for call to ‘ v8::Object::Set(v8::Localv8::String, Nan::imp::FactoryBasev8::Boolean::retur n_t)’
npm ERR! 331 | results->Set(Nan::Newv8::String(“dcd”).ToLocalChecked(), Nan::Newv8::Boolean(data->dcd));
npm ERR! | ^
npm ERR! In file included from /home/lord/.cache/node-gyp/16.16.0/include/node/n ode.h:63,
npm ERR! from …/…/…/…/…/nan/nan.h:60,
npm ERR! from …/src/./serialport.h:6,
npm ERR! from …/src/serialport.cpp:1:
npm ERR! /home/lord/.cache/node-gyp/16.16.0/include/node/v8.h:3961:37: note: can didate: ‘v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Local<v8::V alue>, v8::Localv8::Value)’
npm ERR! 3961 | V8_WARN_UNUSED_RESULT Maybe Set(Local context,
npm ERR! | ^~~
npm ERR! /home/lord/.cache/node-gyp/16.16.0/include/node/v8.h:3961:37: note: c andidate expects 3 arguments, 2 provided
npm ERR! /home/lord/.cache/node-gyp/16.16.0/include/node/v8.h:3964:37: note: can didate: ‘v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::L ocalv8::Value)’
npm ERR! 3964 | V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
npm ERR! | ^~~
npm ERR! /home/lord/.cache/node-gyp/16.16.0/include/node/v8.h:3964:37: note: c andidate expects 3 arguments, 2 provided
npm ERR! …/src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE GetBaud Rate(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! …/src/serialport.cpp:363:58: warning: cast between incompatible functi on types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_w ork_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
npm ERR! 363 | uv_queue_work(uv_default_loop(), req, EIO_GetBaudRate, (uv_af ter_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::Localv8::String, Nan::imp::IntegerFactoryv8::Integer::r eturn_t)’
npm ERR! 378 | results->Set(Nan::Newv8::String(“baudRate”).ToLocalChecke d(), Nan::Newv8::Integer(data->baudRate));
npm ERR! | ^
npm ERR! In file included from /home/lord/.cache/node-gyp/16.16.0/include/node/n ode.h:63,
npm ERR! from …/…/…/…/…/nan/nan.h:60,
npm ERR! from …/src/./serialport.h:6,
npm ERR! from …/src/serialport.cpp:1:
npm ERR! /home/lord/.cache/node-gyp/16.16.0/include/node/v8.h:3961:37: note: can didate: ‘v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Local<v8::V alue>, v8::Localv8::Value)’
npm ERR! 3961 | V8_WARN_UNUSED_RESULT Maybe Set(Local context,
npm ERR! | ^~~
npm ERR! /home/lord/.cache/node-gyp/16.16.0/include/node/v8.h:3961:37: note: c andidate expects 3 arguments, 2 provided
npm ERR! /home/lord/.cache/node-gyp/16.16.0/include/node/v8.h:3964:37: note: can didate: ‘v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::L ocalv8::Value)’
npm ERR! 3964 | V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
npm ERR! | ^~~
npm ERR! /home/lord/.cache/node-gyp/16.16.0/include/node/v8.h:3964:37: note: c andidate expects 3 arguments, 2 provided
npm ERR! …/src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Drain(N an::NAN_METHOD_ARGS_TYPE)’:
npm ERR! …/src/serialport.cpp:409:52: warning: cast between incompatible functi on types from ‘void (
)(uv_work_t*)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_w ork_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
npm ERR! 409 | uv_queue_work(uv_default_loop(), req, EIO_Drain, (uv_after_wo rk_cb)EIO_AfterDrain);
npm ERR! | ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
npm ERR! …/src/serialport.cpp: At global scope:
npm ERR! …/src/serialport.cpp:430:28: warning: unnecessary parentheses in decla ration of ‘ToParityEnum’ [-Wparentheses]
npm ERR! 430 | SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::St ring>& v8str)) {
npm ERR! | ^
npm ERR! …/src/serialport.cpp:449:30: warning: unnecessary parentheses in decla ration of ‘ToStopBitEnum’ [-Wparentheses]
npm ERR! 449 | SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) {
npm ERR! | ^
npm ERR! In file included from …/…/…/…/…/nan/nan.h:60,
npm ERR! from …/src/./serialport.h:6,
npm ERR! from …/src/serialport.cpp:1:
npm ERR! /home/lord/.cache/node-gyp/16.16.0/include/node/node.h:847:7: warning: cast between incompatible function types from ‘void ()(Nan::ADDON_REGISTER_FUNC TION_ARGS_TYPE)’ {aka ‘void ()(v8::Localv8::Object)’} to ‘node::addon_registe r_func’ {aka ‘void ()(v8::Localv8::Object, v8::Localv8::Value, void)’} [-W cast-function-type]
npm ERR! 847 | (node::addon_register_func) (regfunc),
npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /home/lord/.cache/node-gyp/16.16.0/include/node/node.h:881:3: note: in expansion of macro ‘NODE_MODULE_X’
npm ERR! 881 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readabil ity/null_usage)
npm ERR! | ^~~~~~~~~~~~~
npm ERR! …/src/serialport.cpp:483:1: note: in expansion of macro ‘NODE_MODULE’
npm ERR! 483 | NODE_MODULE(serialport, init);
npm ERR! | ^~~~~~~~~~~
npm ERR! make: *** [bindings.target.mk:114: Release/obj.target/bindings/src/seri alport.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 (/usr/lib/node_modules/npm/no de_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:interna l/child_process:291:12)
npm ERR! gyp ERR! System Linux 5.15.32-v7l+
npm ERR! gyp ERR! command “/usr/bin/node” “/usr/lib/node_modules/npm/node_module s/node-gyp/bin/node-gyp.js” “rebuild”
npm ERR! gyp ERR! cwd /home/lord/node_modules/ncd-red-wireless/node_modules/@ser ialport/bindings
npm ERR! gyp ERR! node -v v16.16.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /home/lord/.npm/_logs/2022-08-02T14_15_24_067Z-debug-0.log

I can install the other libraries, such as ncd-red-mcp23008, but with the ncd-red-wireless I have problems.

If you could help me or know what could be wrong, I would appreciate it!

Thanks.

Greetings.

Try:

npm install ncd-red-wireless-2

Its works !

Thanks Travis.

Greetings.

Travis,

Unfortunately, the nodes are installed, but the nodes are not seen on the side, that is, they are installed, but they are not reflected in nodered.

Thanks.

fsaavedra,

When I encounter gateways with ncd-red-wireless on them, I usually follow these steps.

node-red-stop
cd .node-red
npm uninstall ncd-red-wireless
npm install ncd-red-wireless-2
node-red-start

If you try to install ncd-red-wireless-2 over the top of ncd-red-wireless I dont think it likes it.
NCD has said in the past that the ncd-red-wireless was built and designed for some of the more simpler and less compute intensive gateways (like an Onion Omega), but the ncd-red-wireless-2 is what you want to use as long as you have enough compute power, like on Raspberry Pi