Hi,
I updated node-red to newest version and Node Js to version 14 (been doing it for 6 hours now..) And finally I think I got most of the things working, but critical application is not working. I have sensors that I am reading with the node-red-contrib-noble module.
It is correctly shown in the list of nodes
But when ever I place it somewhere I get an error "module_not_found".
Been trying to reinstall it from GUI and console, but it is not helping. When installing it from the console I get following errors:
[code]pi@raspberrypi:~/.node-red $ npm install node-red-contrib-noble
> bluetooth-hci-socket@0.5.1 install /home/pi/.node-red/node_modules/bluetooth-hci-socket
> node-gyp rebuild
make: Siirrytään hakemistoon â/home/pi/.node-red/node_modules/bluetooth-hci-socket/buildâ
CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
../src/BluetoothHciSocket.cpp: In static member function âstatic void BluetoothHciSocket::In it(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)â:
../src/BluetoothHciSocket.cpp:128:82: error: no matching function for call to âv8::FunctionT emplate::GetFunction()â
128 | target->Set(Nan::New("BluetoothHciSocket").ToLocalChecked(), tmpl->GetFunction());
| ^
In file included from /home/pi/.cache/node-gyp/14.20.0/include/node/node.h:67,
from /home/pi/.cache/node-gyp/14.20.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/14.20.0/include/node/v8.h:6482:46: note: candidate: âv8::MaybeLocal <v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)â
6482 | V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
| ^~~~~~~~~~~
/home/pi/.cache/node-gyp/14.20.0/include/node/v8.h:6482:46: note: candidate expects 1 argu ment, 0 provided
../src/BluetoothHciSocket.cpp: In member function âvoid BluetoothHciSocket::poll()â:
../src/BluetoothHciSocket.cpp:251:95: warning: âv8::Local<v8::Value> Nan::MakeCallback(v8::L ocal<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)â is deprecated [-Wdepre cated-declarations]
251 | Callback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
| ^
In file included from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan.h:1051:46: note: declared here
1051 | NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
| ^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp: In member function âvoid BluetoothHciSocket::emitErrnoError( â:
../src/BluetoothHciSocket.cpp:269:109: error: no matching function for call to âv8::Object:: Get(v8::Local<v8::String>)â
269 | ructor = Local<Function>::Cast(globalObj->Get(Nan::New("Error").ToLocalChecked()));
| ^
In file included from /home/pi/.cache/node-gyp/14.20.0/include/node/node.h:67,
from /home/pi/.cache/node-gyp/14.20.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/14.20.0/include/node/v8.h:3717:43: note: candidate: âv8::MaybeLocal <v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)â
3717 | V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
| ^~~
/home/pi/.cache/node-gyp/14.20.0/include/node/v8.h:3717:43: note: candidate expects 2 argu ments, 1 provided
/home/pi/.cache/node-gyp/14.20.0/include/node/v8.h:3720:43: note: candidate: âv8::MaybeLocal <v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)â
3720 | V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
| ^~~
/home/pi/.cache/node-gyp/14.20.0/include/node/v8.h:3720:43: note: candidate expects 2 argu ments, 1 provided
../src/BluetoothHciSocket.cpp:275:72: error: no matching function for call to âv8::Function: :NewInstance(int, v8::Local<v8::Value> [1])â
275 | Local<Value> error = errorConstructor->NewInstance(1, constructorArgs);
| ^
In file included from /home/pi/.cache/node-gyp/14.20.0/include/node/node.h:67,
from /home/pi/.cache/node-gyp/14.20.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/14.20.0/include/node/v8.h:4451:44: note: candidate: âv8::MaybeLocal <v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) c onstâ
4451 | V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
| ^~~~~~~~~~~
/home/pi/.cache/node-gyp/14.20.0/include/node/v8.h:4451:44: note: candidate expects 3 argu ments, 2 provided
/home/pi/.cache/node-gyp/14.20.0/include/node/v8.h:4454:44: note: candidate: âv8::MaybeLocal <v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) constâ
4454 | V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
| ^~~~~~~~~~~
/home/pi/.cache/node-gyp/14.20.0/include/node/v8.h:4454:44: note: candidate expects 1 argu ment, 2 provided
../src/BluetoothHciSocket.cpp:282:93: warning: âv8::Local<v8::Value> Nan::MakeCallback(v8::L ocal<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)â is deprecated [-Wdepre cated-declarations]
282 | Callback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
| ^
In file included from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan.h:1051:46: note: declared here
1051 | NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
| ^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp: In static member function âstatic Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindRaw(Nan::NAN_METHOD_ARGS_TYPE)â:
../src/BluetoothHciSocket.cpp:395:34: error: no matching function for call to âv8::Value::In tegerValue()â
395 | devId = arg0->IntegerValue();
| ^
In file included from /home/pi/.cache/node-gyp/14.20.0/include/node/node.h:67,
from /home/pi/.cache/node-gyp/14.20.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/14.20.0/include/node/v8.h:2863:40: note: candidate: âv8::Maybe<long long int> v8::Value::IntegerValue(v8::Local<v8::Context>) constâ
2863 | V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
| ^~~~~~~~~~~~
/home/pi/.cache/node-gyp/14.20.0/include/node/v8.h:2863:40: note: candidate expects 1 argu ment, 0 provided
../src/BluetoothHciSocket.cpp: In static member function âstatic Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindUser(Nan::NAN_METHOD_ARGS_TYPE)â:
../src/BluetoothHciSocket.cpp:417:34: error: no matching function for call to âv8::Value::In tegerValue()â
417 | devId = arg0->IntegerValue();
| ^
In file included from /home/pi/.cache/node-gyp/14.20.0/include/node/node.h:67,
from /home/pi/.cache/node-gyp/14.20.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/14.20.0/include/node/v8.h:2863:40: note: candidate: âv8::Maybe<long long int> v8::Value::IntegerValue(v8::Local<v8::Context>) constâ
2863 | V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
| ^~~~~~~~~~~~
/home/pi/.cache/node-gyp/14.20.0/include/node/v8.h:2863:40: note: candidate expects 1 argu ment, 0 provided
In file included from /home/pi/.cache/node-gyp/14.20.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
../src/BluetoothHciSocket.cpp: At global scope:
/home/pi/.cache/node-gyp/14.20.0/include/node/node.h:793:7: warning: cast between incompatib le 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>, v 8::Local<v8::Value>, void*)â} [-Wcast-function-type]
793 | (node::addon_register_func) (regfunc), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/14.20.0/include/node/node.h:827:3: note: in expansion of macro âNOD E_MODULE_Xâ
827 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
| ^~~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:499:1: note: in expansion of macro âNODE_MODULEâ
499 | NODE_MODULE(binding, BluetoothHciSocket::Init);
| ^~~~~~~~~~~
make: *** [binding.target.mk:109: Release/obj.target/binding/src/BluetoothHciSocket.o] Virhe 1
make: Poistutaan hakemistosta â/home/pi/.node-red/node_modules/bluetooth-hci-socket/buildâ
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node -gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Linux 5.15.32-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gy p/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/.node-red/node_modules/bluetooth-hci-socket
gyp ERR! node -v v14.20.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connection@~0.1.4 (node_modules/noble/no de_modules/xpc-connection):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for xpc-connection@0.1.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bluetooth-hci-socket@0.5.1 (node_modules/blu etooth-hci-socket):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bluetooth-hci-socket@0.5.1 install: `node-gy p rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ node-red-contrib-noble@0.3.0
removed 1 package, updated 1 package and audited 1329 packages in 59.136s
96 packages are looking for funding
run `npm fund` for details
found 44 vulnerabilities (7 low, 21 moderate, 13 high, 3 critical)
run `npm audit fix` to fix them, or `npm audit` for details[/code]
Anyone bumped into this and could help?
Best regards