Anyone using node-red-node-discovery? I wasn't able to install it on my Debian Pi system. Got all sorts of errors I don't understand. The docs mentioned a dependency that I needed, and that installed just fine.
Please share the errors you got otherwise there's not much we can help with.
This is what I got when I tried to install from the command line:
npm i node-red-node-discovery
mdns@2.3.4 install /home/fabnav/.node-red/node_modules/mdns
node-gyp rebuild
make: Entering directory '/home/fabnav/.node-red/node_modules/mdns/build'
CXX(target) Release/obj.target/dns_sd_bindings/src/dns_sd.o
In file included from ../node_modules/nan/nan.h:190:0,
from ../src/mdns.hpp:12,
from ../src/dns_sd.cpp:1:
../node_modules/nan/nan_maybe_43_inl.h: In function 'Nan::Maybe Nan::ForceSet(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Value, v8::PropertyAttribute)':
../node_modules/nan/nan_maybe_43_inl.h:88:15: error: 'class v8::Object' has no member named 'ForceSet'
return obj->ForceSet(GetCurrentContext(), key, value, attribs);
^~~~~~~~
In file included from ../src/mdns.hpp:12:0,
from ../src/dns_sd.cpp:1:
../node_modules/nan/nan.h: In function 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)':
../node_modules/nan/nan.h:817:60: warning: 'v8::Localv8::Value node::MakeCallback(v8::Isolate, v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, func, argc, argv);
^
In file included from ../src/mdns.hpp:11:0,
from ../src/dns_sd.cpp:1:
/home/fabnav/.node-gyp/10.15.1/include/node/node.h:177:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^
/home/fabnav/.node-gyp/10.15.1/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/mdns.hpp:12:0,
from ../src/dns_sd.cpp:1:
../node_modules/nan/nan.h: In function 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)':
../node_modules/nan/nan.h:831:62: warning: 'v8::Localv8::Value node::MakeCallback(v8::Isolate*, v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, symbol, argc, argv);
^
In file included from ../src/mdns.hpp:11:0,
from ../src/dns_sd.cpp:1:
/home/fabnav/.node-gyp/10.15.1/include/node/node.h:170:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^
/home/fabnav/.node-gyp/10.15.1/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/mdns.hpp:12:0,
from ../src/dns_sd.cpp:1:
../node_modules/nan/nan.h: In function 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, const char, int, v8::Localv8::Value)':
../node_modules/nan/nan.h:845:62: warning: 'v8::Localv8::Value node::MakeCallback(v8::Isolate, v8::Localv8::Object, const char*, int, v8::Localv8::Value)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, method, argc, argv);
^
In file included from ../src/mdns.hpp:11:0,
from ../src/dns_sd.cpp:1:
/home/fabnav/.node-gyp/10.15.1/include/node/node.h:163:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^
/home/fabnav/.node-gyp/10.15.1/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/mdns.hpp:12:0,
from ../src/dns_sd.cpp:1:
../node_modules/nan/nan.h: In member function 'v8::Localv8::Value Nan::Callback::Call_(v8::Isolate, v8::Localv8::Object, int, v8::Localv8::Value) const':
../node_modules/nan/nan.h:1463:5: warning: 'v8::Localv8::Value node::MakeCallback(v8::Isolate, v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
));
^
In file included from ../src/mdns.hpp:11:0,
from ../src/dns_sd.cpp:1:
/home/fabnav/.node-gyp/10.15.1/include/node/node.h:177:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^
/home/fabnav/.node-gyp/10.15.1/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/dns_sd.cpp:7:0:
../src/txt_record_ref.hpp: In static member function 'static bool node_mdns::TxtRecordRef::HasInstance(v8::Handlev8::Value)':
../src/txt_record_ref.hpp:18:60: warning: 'v8::Localv8::Object v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
v8::Localv8::Object object = value->ToObject();
^
In file included from /home/fabnav/.node-gyp/10.15.1/include/node/node.h:63:0,
from ../src/mdns.hpp:11,
from ../src/dns_sd.cpp:1:
/home/fabnav/.node-gyp/10.15.1/include/node/v8.h:10046:15: note: declared here
Local Value::ToObject() const {
^~~~~
../src/dns_sd.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE node_mdns::exportConstants(Nan::NAN_METHOD_ARGS_TYPE)':
../src/dns_sd.cpp:314:36: warning: 'v8::Localv8::Object v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
addConstants(info[0]->ToObject());
^
In file included from /home/fabnav/.node-gyp/10.15.1/include/node/node.h:63:0,
from ../src/mdns.hpp:11,
from ../src/dns_sd.cpp:1:
/home/fabnav/.node-gyp/10.15.1/include/node/v8.h:10046:15: note: declared here
Local Value::ToObject() const {
^~~~~
dns_sd_bindings.target.mk:159: recipe for target 'Release/obj.target/dns_sd_bindings/src/dns_sd.o' failed
make: *** [Release/obj.target/dns_sd_bindings/src/dns_sd.o] Error 1
make: Leaving directory '/home/fabnav/.node-red/node_modules/mdns/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:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.14.79-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/fabnav/.node-red/node_modules/mdns
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.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 ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mdns@2.3.4 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mdns@2.3.4 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/fabnav/.npm/_logs/2019-02-26T19_20_48_229Z-debug.log
Looks as if the mdns package that the node relies on isn’t yet compatible with nodejs10
If there isn’t an issue open on the node you are trying to install github page I would suggest opening an issue there
Hi - saw this...
I have bumped up the package version and it now seems to compile and install OK on node v10 as long as the pre-reqs are installed... (still loads of warnings but no errors) pushed to npm as version 0.0.21
Thank you both for your help. I was able to install the node, and it seems to be working. It discovered the three systems that I wanted it to discover. Very cool! The discovery happened when I deployed. I don't see any way to trigger it to ever run again. Any chance there is a way to do that?
Also, I'm seeing a bunch of warnings on the console when NR starts up. Can anything be done about this?
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
27 Feb 18:39:03 - [info] You may ignore the warning about Bonjour compatability.
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
It reports any changes so doesn’t need to be triggered. You may need to save the state in context but that is up to you.
No, I don’t think there is a way to remove that warning without fixing the underlying code libraries. (which hasn’t happened in over 5 years)
Okay. Thank you.
I'm sitting here waiting... I have three systems that are normally discovered when I deploy. I powered down one system and deployed. Two systems were discovered as expected. Next I powered back up the third system. It's been several minutes and no new discovery message is being generated. How long should I have to wait?
I got tired of waiting. I re-deployed and all three systems were discovered. At this point I'm not in agreement with your statement about not needing to be triggered.
I have a little more information on this. When only two of my systems are powered up, I see that the discovery node generated this error: Error: dns service error: unknown
. I wonder if that error is preventing it from discovering anything new?
when was that produced ? when the 3rd powered up (and should have been discovered) ? or ... ?
It was produced when only two of the three systems were powered up.
Hi,
I've tried installing this node however it fails, apparently because the mdns package installation fails - see below. I'm running on RPi 3B+ , buster, node-red 1.0.3.
I'm trying to discover the IP addresses of my Goole Home devices from node-red.
Any assistance is most appreciated.
pi@raspberrypi:~ $ npm install mdns
usb@1.5.0 install /home/pi/node_modules/usb
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/tessel/node-usb/releases/download/1.5.0/usb_bindings-v1.5.0-node-v72-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for usb@1.5.0 and node@12.14.1 (node-v72 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/home/pi/node_modules/usb/build'
CC(target) Release/obj.target/libusb/libusb/libusb/core.o
CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
CC(target) Release/obj.target/libusb/libusb/libusb/io.o
CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
../libusb/libusb/os/linux_udev.c:40:10: fatal error: libudev.h: No such file or directory
#include <libudev.h>
^~~~~~~~~~~
compilation terminated.
make: *** [libusb.target.mk:146: Release/obj.target/libusb/libusb/libusb/os/linux_udev.o] Error 1
make: Leaving directory '/home/pi/node_modules/usb/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:223:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.19.93-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/node_modules/usb/src/binding/usb_bindings.node" "--module_name=usb_bindings" "--module_path=/home/pi/node_modules/usb/src/binding" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /home/pi/node_modules/usb
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/pi/node_modules/usb/src/binding --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess. (/home/pi/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:223:5)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Linux 4.19.93-v7+
node-pre-gyp ERR! command "/usr/bin/node" "/home/pi/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/pi/node_modules/usb
node-pre-gyp ERR! node -v v12.14.1
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/pi/node_modules/usb/src/binding --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
bluetooth-hci-socket@0.5.1 install /home/pi/node_modules/bluetooth-hci-socket
node-gyp rebuild
make: Entering directory '/home/pi/node_modules/bluetooth-hci-socket/build'
CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
In file included from ../../nan/nan_converters.h:67,
from ../../nan/nan.h:222,
from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan_converters_43_inl.h: In static member function 'static Nan::ToFactoryBasev8::Boolean::return_t Nan::ToFactoryv8::Boolean::convert(v8::Localv8::Value)':
../../nan/nan_converters_43_inl.h:18:51: warning: 'v8::MaybeLocalv8::Boolean v8::Value::ToBoolean(v8::Localv8::Context) const' is deprecated: ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations]
val->To ## TYPE(isolate->GetCurrentContext())
^
../../nan/nan_converters_43_inl.h:22:1: note: in expansion of macro 'X'
X(Boolean)
^
In file included from /home/pi/.cache/node-gyp/12.14.1/include/node/v8-internal.h:14,
from /home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:25,
from /home/pi/.cache/node-gyp/12.14.1/include/node/node.h:63,
from /home/pi/.cache/node-gyp/12.14.1/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:2568:59: note: declared here
V8_WARN_UNUSED_RESULT MaybeLocal ToBoolean(
^~~~~~~~~
/home/pi/.cache/node-gyp/12.14.1/include/node/v8config.h:311:3: note: in definition of macro 'V8_DEPRECATED'
declarator attribute((deprecated(message)))
^~~~~~~~~~
In file included from ../../nan/nan_converters.h:67,
from ../../nan/nan.h:222,
from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan_converters_43_inl.h: In static member function 'static Nan::ValueFactoryBase::return_t Nan::ToFactory::convert(v8::Localv8::Value)':
../../nan/nan_converters_43_inl.h:37:57: warning: 'v8::Maybe v8::Value::BooleanValue(v8::Localv8::Context) const' is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
return val->NAME ## Value(isolate->GetCurrentContext());
^
../../nan/nan_converters_43_inl.h:40:1: note: in expansion of macro 'X'
X(bool, Boolean)
^
In file included from /home/pi/.cache/node-gyp/12.14.1/include/node/v8-internal.h:14,
from /home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:25,
from /home/pi/.cache/node-gyp/12.14.1/include/node/node.h:63,
from /home/pi/.cache/node-gyp/12.14.1/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:2606:51: note: declared here
V8_WARN_UNUSED_RESULT Maybe BooleanValue(
^~~~~~~~~~~~
/home/pi/.cache/node-gyp/12.14.1/include/node/v8config.h:311:3: note: in definition of macro 'V8_DEPRECATED'
declarator attribute((deprecated(message)))
^~~~~~~~~~
In file included from ../../nan/nan_new.h:189,
from ../../nan/nan.h:223,
from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan_implementation_12_inl.h: In static member function 'static Nan::FactoryBasev8::StringObject::return_t Nan::Factoryv8::StringObject::New(v8::Localv8::String)':
../../nan/nan_implementation_12_inl.h:356:37: error: no matching function for call to 'v8::StringObject::New(v8::Localv8::String&)'
return v8::StringObject::New(value).Asv8::StringObject();
^
In file included from /home/pi/.cache/node-gyp/12.14.1/include/node/node.h:63,
from /home/pi/.cache/node-gyp/12.14.1/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:5426:23: note: candidate: 'static v8::Localv8::Value v8::StringObject::New(v8::Isolate*, v8::Localv8::String)'
static Local New(Isolate* isolate, Local value);
^~~
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:5426:23: note: candidate expects 2 arguments, 1 provided
In file included from ../../nan/nan_new.h:189,
from ../../nan/nan.h:223,
from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan_implementation_12_inl.h:356:58: error: expected primary-expression before '>' token
return v8::StringObject::New(value).Asv8::StringObject();
^
../../nan/nan_implementation_12_inl.h:356:60: error: expected primary-expression before ')' token
return v8::StringObject::New(value).Asv8::StringObject();
^
In file included from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker*)':
../../nan/nan.h:2232:62: 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]
, reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
^
In file included from /usr/include/c++/8/cassert:44,
from /home/pi/.cache/node-gyp/12.14.1/include/node/node_object_wrap.h:26,
from ../../nan/nan.h:55,
from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan_object_wrap.h: In destructor 'virtual Nan::ObjectWrap::~ObjectWrap()':
../../nan/nan_object_wrap.h:24:25: error: 'class Nan::Persistentv8::Object' has no member named 'IsNearDeath'
assert(persistent().IsNearDeath());
^~~~~~~~~~~
../../nan/nan_object_wrap.h: In static member function 'static void Nan::ObjectWrap::WeakCallback(const v8::WeakCallbackInfoNan::ObjectWrap&)':
../../nan/nan_object_wrap.h:127:26: error: 'class Nan::Persistentv8::Object' has no member named 'IsNearDeath'
assert(wrap->handle_.IsNearDeath());
^~~~~~~~~~~
../src/BluetoothHciSocket.cpp: In static member function 'static void BluetoothHciSocket::Init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)':
../src/BluetoothHciSocket.cpp:128:82: error: no matching function for call to 'v8::FunctionTemplate::GetFunction()'
target->Set(Nan::New("BluetoothHciSocket").ToLocalChecked(), tmpl->GetFunction());
^
In file included from /home/pi/.cache/node-gyp/12.14.1/include/node/node.h:63,
from /home/pi/.cache/node-gyp/12.14.1/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:5995:46: note: candidate: 'v8::MaybeLocalv8::Function v8::FunctionTemplate::GetFunction(v8::Localv8::Context)'
V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(
^~~~~~~~~~~
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:5995:46: note: candidate expects 1 argument, 0 provided
../src/BluetoothHciSocket.cpp: In member function 'void BluetoothHciSocket::poll()':
../src/BluetoothHciSocket.cpp:251:95: warning: 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan.h:980:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:251:95: warning: 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan.h:980:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp: In member function 'void BluetoothHciSocket::emitErrnoError()':
../src/BluetoothHciSocket.cpp:269:109: warning: 'v8::Localv8::Value v8::Object::Get(v8::Localv8::Value)' is deprecated: Use maybe version [-Wdeprecated-declarations]
Local errorConstructor = Local::Cast(globalObj->Get(Nan::New("Error").ToLocalChecked()));
^
In file included from /home/pi/.cache/node-gyp/12.14.1/include/node/v8-internal.h:14,
from /home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:25,
from /home/pi/.cache/node-gyp/12.14.1/include/node/node.h:63,
from /home/pi/.cache/node-gyp/12.14.1/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:3457:51: note: declared here
V8_DEPRECATED("Use maybe version", Local Get(Local key));
^~~
/home/pi/.cache/node-gyp/12.14.1/include/node/v8config.h:311:3: note: in definition of macro 'V8_DEPRECATED'
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/BluetoothHciSocket.cpp:275:72: error: no matching function for call to 'v8::Function::NewInstance(int, v8::Localv8::Value [1])'
Local error = errorConstructor->NewInstance(1, constructorArgs);
^
In file included from /home/pi/.cache/node-gyp/12.14.1/include/node/node.h:63,
from /home/pi/.cache/node-gyp/12.14.1/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:4176:44: note: candidate: 'v8::MaybeLocalv8::Object v8::Function::NewInstance(v8::Localv8::Context, int, v8::Localv8::Value) const'
V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(
^~~~~~~~~~~
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:4176:44: note: candidate expects 3 arguments, 2 provided
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:4179:44: note: candidate: 'v8::MaybeLocalv8::Object v8::Function::NewInstance(v8::Localv8::Context) const'
V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(
^~~~~~~~~~~
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:4179:44: note: candidate expects 1 argument, 2 provided
../src/BluetoothHciSocket.cpp:282:93: warning: 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan.h:980:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:282:93: warning: 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan.h:980:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::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::IntegerValue()'
devId = arg0->IntegerValue();
^
In file included from /home/pi/.cache/node-gyp/12.14.1/include/node/node.h:63,
from /home/pi/.cache/node-gyp/12.14.1/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:2609:40: note: candidate: 'v8::Maybe v8::Value::IntegerValue(v8::Localv8::Context) const'
V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
^~~~~~~~~~~~
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:2609:40: note: candidate expects 1 argument, 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::IntegerValue()'
devId = arg0->IntegerValue();
^
In file included from /home/pi/.cache/node-gyp/12.14.1/include/node/node.h:63,
from /home/pi/.cache/node-gyp/12.14.1/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:2609:40: note: candidate: 'v8::Maybe v8::Value::IntegerValue(v8::Localv8::Context) const'
V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
^~~~~~~~~~~~
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:2609:40: note: candidate expects 1 argument, 0 provided
In file included from /home/pi/.cache/node-gyp/12.14.1/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
../src/BluetoothHciSocket.cpp: At global scope:
/home/pi/.cache/node-gyp/12.14.1/include/node/node.h:560:43: warning: cast between incompatible function types from 'void ()(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)' {aka 'void ()(v8::Localv8::Object)'} to 'node::addon_register_func' {aka 'void ()(v8::Localv8::Object, v8::Localv8::Value, void*)'} [-Wcast-function-type]
(node::addon_register_func) (regfunc),
^
/home/pi/.cache/node-gyp/12.14.1/include/node/node.h:594:3: note: in expansion of macro 'NODE_MODULE_X'
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^~~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:499:1: note: in expansion of macro 'NODE_MODULE'
NODE_MODULE(binding, BluetoothHciSocket::Init);
^~~~~~~~~~~
In file included from /home/pi/.cache/node-gyp/12.14.1/include/node/node.h:63,
from /home/pi/.cache/node-gyp/12.14.1/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h: In instantiation of 'void v8::PersistentBase::SetWeak(P*, typename v8::WeakCallbackInfo
::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo
::Callback = void ()(const v8::WeakCallbackInfonode::ObjectWrap&)]':
/home/pi/.cache/node-gyp/12.14.1/include/node/node_object_wrap.h:84:78: required from here
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfonode::ObjectWrap::Callback' {aka 'void ()(const v8::WeakCallbackInfonode::ObjectWrap&)'} to 'Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} [-Wcast-function-type]
reinterpret_cast(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h: In instantiation of 'void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo
::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo
::Callback = void ()(const v8::WeakCallbackInfoNan::ObjectWrap&)]':
../../nan/nan_object_wrap.h:66:61: required from here
/home/pi/.cache/node-gyp/12.14.1/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfoNan::ObjectWrap::Callback' {aka 'void ()(const v8::WeakCallbackInfoNan::ObjectWrap&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo&)'} [-Wcast-function-type]
make: *** [binding.target.mk:107: Release/obj.target/binding/src/BluetoothHciSocket.o] Error 1
make: Leaving directory '/home/pi/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/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:223:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.19.93-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_modules/bluetooth-hci-socket
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
mdns@2.5.1 install /home/pi/node_modules/mdns
node-gyp rebuild
make: Entering directory '/home/pi/node_modules/mdns/build'
CXX(target) Release/obj.target/dns_sd_bindings/src/dns_sd.o
In file included from ../src/dns_sd.cpp:1:
../src/mdns.hpp:32:10: fatal error: dns_sd.h: No such file or directory
#include <dns_sd.h>
^~~~~~~~~~
compilation terminated.
make: *** [dns_sd_bindings.target.mk:174: Release/obj.target/dns_sd_bindings/src/dns_sd.o] Error 1
make: Leaving directory '/home/pi/node_modules/mdns/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:223:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.19.93-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_modules/mdns
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connection@0.1.4 (node_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: usb@1.5.0 (node_modules/usb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.5.0 install: node-pre-gyp install --fallback-to-build
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bluetooth-hci-socket@0.5.1 (node_modules/bluetooth-hci-socket):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bluetooth-hci-socket@0.5.1 install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mdns@2.5.1 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mdns@2.5.1 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/2020-02-04T15_07_08_472Z-debug.log
Did you install the prerequisites? https://flows.nodered.org/node/node-red-node-discovery
Yes, they installed without issue.
pi@raspberrypi:~ $ sudo apt-get install libavahi-compat-libdnssd-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libavahi-compat-libdnssd-dev is already the newest version (0.7-4+b1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Looks like you might need to install libudev-dev too.
Many thanks Colin, that worked !. my coding skills are very limited.
Perhaps dceejay could update the installation prequisites in npm.
One other thing - I expected the discovery node to have a configurable polling interval, however it appears to run just once. Maybe it only responds to announcements ?
Am I missing something ?
Answering my own question - the discovery node responds only to changes in service state, I depowered and repowered a google home unit and the discovery node sent two corresponding messages.
Noted - will add to pre-reqs. thanks
Dear,
I get an error when trying to install "node-red-node-discovery" on a raspberry pi 4.
The prerequisites (installation of libavahi-compat-libdnssd-dev & libudev-dev) are met.
Here is the log:
2022-12-26T13:48:41.219Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-node-discovery@0.0.23
2022-12-26T13:48:42.565Z [err] npm
2022-12-26T13:48:42.566Z [err]
2022-12-26T13:48:42.567Z [err] WARN
2022-12-26T13:48:42.567Z [err]
2022-12-26T13:48:42.567Z [err] config
2022-12-26T13:48:42.567Z [err] production Use `--omit=dev` instead.
2022-12-26T13:48:49.792Z [err] npm
2022-12-26T13:48:49.792Z [err] ERR!
2022-12-26T13:48:49.793Z [err] code
2022-12-26T13:48:49.793Z [err] 1
2022-12-26T13:48:49.795Z [err] npm ERR! path /home/pi/.node-red/node_modules/mdns
2022-12-26T13:48:49.797Z [err] npm
2022-12-26T13:48:49.798Z [err]
2022-12-26T13:48:49.798Z [err] ERR!
2022-12-26T13:48:49.798Z [err] command failed
2022-12-26T13:48:49.798Z [err] npm
2022-12-26T13:48:49.798Z [err] ERR! command sh -c node-gyp rebuild
2022-12-26T13:48:49.798Z [err] npm
2022-12-26T13:48:49.798Z [err] ERR! gyp info it worked if it ends with ok
2022-12-26T13:48:49.799Z [err] npm
2022-12-26T13:48:49.799Z [err] ERR! gyp info using node-gyp@3.8.0
2022-12-26T13:48:49.799Z [err] npm ERR!
2022-12-26T13:48:49.799Z [err] gyp info using node@16.18.1 | linux | arm
2022-12-26T13:48:49.799Z [err] npm ERR!
2022-12-26T13:48:49.799Z [err] gyp ERR! configure error
2022-12-26T13:48:49.799Z [err] npm
2022-12-26T13:48:49.799Z [err] ERR! gyp ERR! stack Error: Command failed: /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
2022-12-26T13:48:49.799Z [err] npm
2022-12-26T13:48:49.799Z [err] ERR! gyp ERR! stack File "<string>", line 1
2022-12-26T13:48:49.799Z [err] npm
2022-12-26T13:48:49.799Z [err] ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
2022-12-26T13:48:49.799Z [err] npm ERR!
2022-12-26T13:48:49.799Z [err] gyp ERR! stack ^
2022-12-26T13:48:49.799Z [err] npm ERR!
2022-12-26T13:48:49.799Z [err] gyp ERR! stack SyntaxError: invalid syntax
2022-12-26T13:48:49.799Z [err] npm ERR!
2022-12-26T13:48:49.799Z [err] gyp ERR! stack
2022-12-26T13:48:49.799Z [err] npm ERR!
2022-12-26T13:48:49.799Z [err] gyp ERR! stack at ChildProcess.exithandler (node:child_process:402:12)
2022-12-26T13:48:49.799Z [err] npm ERR!
2022-12-26T13:48:49.799Z [err] gyp ERR! stack at ChildProcess.emit (node:events:513:28)
2022-12-26T13:48:49.799Z [err] npm ERR!
2022-12-26T13:48:49.800Z [err] gyp ERR! stack at maybeClose (node:internal/child_process:1100:16)
2022-12-26T13:48:49.800Z [err] npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
2022-12-26T13:48:49.800Z [err] npm ERR! gyp ERR! System Linux 5.15.76-v7l+
2022-12-26T13:48:49.800Z [err] npm
2022-12-26T13:48:49.800Z [err] ERR! gyp ERR! command "/usr/local/bin/node" "/home/pi/.node-red/node_modules/.bin/node-gyp" "rebuild"
2022-12-26T13:48:49.800Z [err] npm
2022-12-26T13:48:49.800Z [err] ERR! gyp ERR! cwd /home/pi/.node-red/node_modules/mdns
2022-12-26T13:48:49.800Z [err] npm
2022-12-26T13:48:49.800Z [err] ERR! gyp ERR! node -v v16.18.1
2022-12-26T13:48:49.800Z [err] npm ERR!
2022-12-26T13:48:49.800Z [err] gyp ERR! node-gyp -v v3.8.0
2022-12-26T13:48:49.800Z [err] npm ERR!
2022-12-26T13:48:49.800Z [err] gyp ERR! not ok
2022-12-26T13:48:49.804Z [err]
2022-12-26T13:48:49.804Z [err] npm
2022-12-26T13:48:49.804Z [err] ERR! A complete log of this run can be found in:
2022-12-26T13:48:49.804Z [err] npm ERR! /home/pi/.npm/_logs/2022-12-26T13_48_42_509Z-debug-0.log
2022-12-26T13:48:49.823Z rc=1
Full log:
0 verbose cli /usr/local/bin/node /usr/local/bin/npm
1 info using npm@9.2.0
2 info using node@v16.18.1
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 5ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 warn config production Use `--omit=dev` instead.
8 timing config:load:cli Completed in 7ms
9 timing config:load:env Completed in 1ms
10 timing config:load:file:/home/pi/.node-red/.npmrc Completed in 0ms
11 timing config:load:project Completed in 3ms
12 timing config:load:file:/home/pi/.npmrc Completed in 3ms
13 timing config:load:user Completed in 3ms
14 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
15 timing config:load:global Completed in 0ms
16 timing config:load:setEnvs Completed in 3ms
17 timing config:load Completed in 25ms
18 timing npm:load:configload Completed in 25ms
19 timing npm:load:mkdirpcache Completed in 1ms
20 timing npm:load:mkdirplogs Completed in 1ms
21 verbose title npm install node-red-node-discovery@0.0.23
22 verbose argv "install" "--no-audit" "--no-update-notifier" "--no-fund" "--save" "--save-prefix" "~" "--production" "--engine-strict" "node-red-node-discovery@0.0.23"
23 timing npm:load:setTitle Completed in 4ms
24 timing config:load:flatten Completed in 7ms
25 timing npm:load:display Completed in 15ms
26 verbose logfile logs-max:10 dir:/home/pi/.npm/_logs/2022-12-26T13_48_42_509Z-
27 verbose logfile /home/pi/.npm/_logs/2022-12-26T13_48_42_509Z-debug-0.log
28 timing npm:load:logFile Completed in 12ms
29 timing npm:load:timers Completed in 0ms
30 timing npm:load:configScope Completed in 0ms
31 timing npm:load Completed in 60ms
32 silly logfile start cleaning logs, removing 1 files
33 timing config:load:flatten Completed in 2ms
34 timing arborist:ctor Completed in 2ms
35 silly logfile done cleaning log files
36 timing idealTree:init Completed in 1460ms
37 timing idealTree:userRequests Completed in 6ms
38 silly idealTree buildDeps
39 silly fetch manifest node-red-node-discovery@0.0.23
40 verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: node_modules
41 http fetch GET 200 https://registry.npmjs.org/node-red-node-discovery 1791ms (cache revalidated)
42 silly placeDep ROOT node-red-node-discovery@0.0.23 OK for: node-red-project@0.0.1 want: 0.0.23
43 silly fetch manifest mdns@^2.5.1
44 http fetch GET 200 https://registry.npmjs.org/mdns 703ms (cache revalidated)
45 timing idealTree:#root Completed in 2521ms
46 silly placeDep ROOT mdns@2.7.2 OK for: node-red-node-discovery@0.0.23 want: ^2.5.1
47 silly fetch manifest nan@^2.14.0
48 http fetch GET 200 https://registry.npmjs.org/nan 67ms (cache revalidated)
49 timing idealTree:node_modules/node-red-node-discovery Completed in 83ms
50 silly placeDep node_modules/mdns nan@2.17.0 OK for: mdns@2.7.2 want: ^2.14.0
51 timing idealTree:node_modules/mdns Completed in 5ms
52 timing idealTree:node_modules/mdns/node_modules/nan Completed in 0ms
53 timing idealTree:buildDeps Completed in 2615ms
54 timing idealTree:fixDepFlags Completed in 18ms
55 timing idealTree Completed in 4116ms
56 timing reify:loadTrees Completed in 4117ms
57 timing reify:diffTrees Completed in 41ms
58 silly reify moves {}
59 timing reify:retireShallow Completed in 3ms
60 timing reify:createSparse Completed in 13ms
61 timing reify:trashOmits Completed in 2ms
62 timing reify:loadBundles Completed in 0ms
63 verbose reify failed optional dependency /home/pi/.node-red/node_modules/amqplib
64 silly reify mark deleted [ '/home/pi/.node-red/node_modules/amqplib' ]
65 verbose reify failed optional dependency /home/pi/.node-red/node_modules/bitsyntax
66 silly reify mark deleted [ '/home/pi/.node-red/node_modules/bitsyntax' ]
67 verbose reify failed optional dependency /home/pi/.node-red/node_modules/buffer-more-ints
68 silly reify mark deleted [ '/home/pi/.node-red/node_modules/buffer-more-ints' ]
69 verbose reify failed optional dependency /home/pi/.node-red/node_modules/when
70 silly reify mark deleted [ '/home/pi/.node-red/node_modules/when' ]
71 timing reifyNode:node_modules/amqplib Completed in 37ms
72 timing reifyNode:node_modules/buffer-fill Completed in 855ms
73 timing reifyNode:node_modules/buffer-alloc-unsafe Completed in 856ms
74 timing reifyNode:node_modules/buffer-alloc Completed in 856ms
75 timing reifyNode:node_modules/unzip-response Completed in 876ms
76 timing reifyNode:node_modules/strip-json-comments Completed in 876ms
77 timing reifyNode:node_modules/simple-mime Completed in 877ms
78 timing reifyNode:node_modules/ini Completed in 878ms
79 timing reifyNode:node_modules/chownr Completed in 882ms
80 timing reifyNode:node_modules/hyperquest/node_modules/buffer-from Completed in 891ms
81 timing reifyNode:node_modules/util-extend Completed in 897ms
82 timing reifyNode:node_modules/fs-constants Completed in 897ms
83 timing reifyNode:node_modules/expand-template Completed in 899ms
84 timing reifyNode:node_modules/hyperquest/node_modules/through2 Completed in 907ms
85 timing reifyNode:node_modules/to-buffer Completed in 914ms
86 timing reifyNode:node_modules/execspawn Completed in 915ms
87 timing reifyNode:node_modules/jsonist/node_modules/string_decoder Completed in 923ms
88 timing reifyNode:node_modules/hyperquest/node_modules/isarray Completed in 925ms
89 timing reifyNode:node_modules/jsonist Completed in 930ms
90 timing reifyNode:node_modules/ghutils Completed in 931ms
91 timing reifyNode:node_modules/deep-extend Completed in 932ms
92 timing reifyNode:node_modules/tar-stream/node_modules/string_decoder Completed in 939ms
93 timing reifyNode:node_modules/tar-stream/node_modules/safe-buffer Completed in 942ms
94 timing reifyNode:node_modules/node-red-node-discovery Completed in 946ms
95 timing reifyNode:node_modules/simple-get Completed in 944ms
96 timing reifyNode:node_modules/ghreleases Completed in 945ms
97 timing reifyNode:node_modules/after Completed in 944ms
98 timing reifyNode:node_modules/tar-stream/node_modules/isarray Completed in 952ms
99 timing reifyNode:node_modules/tar-stream Completed in 958ms
100 timing reifyNode:node_modules/ghrepos Completed in 957ms
101 timing reifyNode:node_modules/fast-future Completed in 958ms
102 timing reifyNode:node_modules/buffer-more-ints Completed in 958ms
103 timing reifyNode:node_modules/noop-logger Completed in 969ms
104 timing reifyNode:node_modules/duplexer2 Completed in 969ms
105 timing reifyNode:node_modules/snappy/node_modules/semver Completed in 986ms
106 timing reifyNode:node_modules/node-ninja/node_modules/semver Completed in 986ms
107 timing reifyNode:node_modules/node-gyp/node_modules/semver Completed in 987ms
108 timing reifyNode:node_modules/jsonist/node_modules/bl Completed in 1006ms
109 timing reifyNode:node_modules/github-from-package Completed in 1016ms
110 timing reifyNode:node_modules/rc Completed in 1025ms
111 timing reifyNode:node_modules/hyperquest/node_modules/readable-stream Completed in 1075ms
112 timing reifyNode:node_modules/bitsyntax Completed in 1078ms
113 timing reifyNode:node_modules/hyperquest Completed in 1105ms
114 timing reifyNode:node_modules/url-template Completed in 1133ms
115 timing reifyNode:node_modules/fs-ext Completed in 1137ms
116 timing reifyNode:node_modules/tar-stream/node_modules/readable-stream Completed in 1200ms
117 timing reifyNode:node_modules/jsonist/node_modules/readable-stream Completed in 1214ms
118 timing reifyNode:node_modules/prebuild Completed in 1288ms
119 timing reifyNode:node_modules/tar-fs Completed in 1313ms
120 timing reifyNode:node_modules/when Completed in 1354ms
121 timing reifyNode:node_modules/snappy/node_modules/nan Completed in 1394ms
122 timing reifyNode:node_modules/leveldown/node_modules/nan Completed in 1392ms
123 timing reifyNode:node_modules/zmq/node_modules/nan Completed in 1398ms
124 timing reifyNode:node_modules/mdns/node_modules/nan Completed in 1431ms
125 timing reifyNode:node_modules/mdns Completed in 1440ms
126 timing reifyNode:node_modules/zmq Completed in 1531ms
127 timing reifyNode:node_modules/snappy Completed in 1612ms
128 timing reifyNode:node_modules/node-ninja Completed in 1668ms
129 timing reifyNode:node_modules/snappy/node_modules/node-gyp Completed in 1670ms
130 timing reifyNode:node_modules/node-gyp Completed in 1670ms
131 timing reifyNode:node_modules/leveldown Completed in 1754ms
132 timing reify:unpack Completed in 1761ms
133 timing reify:unretire Completed in 0ms
134 timing build:queue Completed in 11ms
135 timing build:link:node_modules/node-gyp Completed in 13ms
136 timing build:link:node_modules/node-ninja Completed in 11ms
137 timing build:link:node_modules/prebuild Completed in 11ms
138 timing build:link:node_modules/rc Completed in 4ms
139 timing build:link:node_modules/node-ninja/node_modules/semver Completed in 7ms
140 timing build:link:node_modules/node-gyp/node_modules/semver Completed in 7ms
141 timing build:link:node_modules/snappy/node_modules/node-gyp Completed in 7ms
142 timing build:link:node_modules/snappy/node_modules/semver Completed in 7ms
143 timing build:link Completed in 18ms
144 info run fs-ext@0.5.0 install node_modules/fs-ext node-gyp configure build
145 info run leveldown@1.4.6 install node_modules/leveldown prebuild --install
146 info run mdns@2.7.2 install node_modules/mdns node-gyp rebuild
147 info run snappy@5.0.5 install node_modules/snappy ./node_modules/.bin/node-gyp rebuild
148 info run fs-ext@0.5.0 install { code: 1, signal: null }
149 verbose reify failed optional dependency /home/pi/.node-red/node_modules/fs-ext
150 silly reify mark deleted [ '/home/pi/.node-red/node_modules/fs-ext' ]
151 timing build:run:install:node_modules/fs-ext Completed in 695ms
152 info run zmq@2.15.3 install node_modules/zmq node-gyp rebuild
153 info run mdns@2.7.2 install { code: 1, signal: null }
154 info run snappy@5.0.5 install { code: 1, signal: null }
155 verbose reify failed optional dependency /home/pi/.node-red/node_modules/snappy
156 silly reify mark deleted [ '/home/pi/.node-red/node_modules/snappy' ]
157 verbose reify failed optional dependency /home/pi/.node-red/node_modules/snappy/node_modules/nan
158 silly reify mark deleted [ '/home/pi/.node-red/node_modules/snappy/node_modules/nan' ]
159 verbose reify failed optional dependency /home/pi/.node-red/node_modules/snappy/node_modules/node-gyp
160 silly reify mark deleted [
160 silly reify '/home/pi/.node-red/node_modules/snappy/node_modules/node-gyp',
160 silly reify '/home/pi/.node-red/node_modules/snappy/node_modules/.bin/node-gyp'
160 silly reify ]
161 verbose reify failed optional dependency /home/pi/.node-red/node_modules/snappy/node_modules/semver
162 silly reify mark deleted [
162 silly reify '/home/pi/.node-red/node_modules/snappy/node_modules/semver',
162 silly reify '/home/pi/.node-red/node_modules/snappy/node_modules/.bin/semver'
162 silly reify ]
163 timing build:run:install:node_modules/snappy Completed in 961ms
164 info run zmq@2.15.3 install { code: 1, signal: null }
165 verbose reify failed optional dependency /home/pi/.node-red/node_modules/zmq
166 silly reify mark deleted [ '/home/pi/.node-red/node_modules/zmq' ]
167 verbose reify failed optional dependency /home/pi/.node-red/node_modules/zmq/node_modules/nan
168 silly reify mark deleted [ '/home/pi/.node-red/node_modules/zmq/node_modules/nan' ]
169 timing build:run:install:node_modules/zmq Completed in 419ms
170 timing reify:rollback:createSparse Completed in 332ms
171 timing reify:rollback:retireShallow Completed in 0ms
172 timing command:install Completed in 7179ms
173 verbose stack Error: command failed
173 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
173 verbose stack at ChildProcess.emit (node:events:513:28)
173 verbose stack at maybeClose (node:internal/child_process:1100:16)
173 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
174 verbose pkgid mdns@2.7.2
175 verbose cwd /home/pi/.node-red
176 verbose Linux 5.15.76-v7l+
177 verbose node v16.18.1
178 verbose npm v9.2.0
179 error code 1
180 error path /home/pi/.node-red/node_modules/mdns
181 error command failed
182 error command sh -c node-gyp rebuild
183 error gyp info it worked if it ends with ok
183 error gyp info using node-gyp@3.8.0
183 error gyp info using node@16.18.1 | linux | arm
183 error gyp ERR! configure error
183 error gyp ERR! stack Error: Command failed: /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
183 error gyp ERR! stack File "<string>", line 1
183 error gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
183 error gyp ERR! stack ^
183 error gyp ERR! stack SyntaxError: invalid syntax
183 error gyp ERR! stack
183 error gyp ERR! stack at ChildProcess.exithandler (node:child_process:402:12)
183 error gyp ERR! stack at ChildProcess.emit (node:events:513:28)
183 error gyp ERR! stack at maybeClose (node:internal/child_process:1100:16)
183 error gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
183 error gyp ERR! System Linux 5.15.76-v7l+
183 error gyp ERR! command "/usr/local/bin/node" "/home/pi/.node-red/node_modules/.bin/node-gyp" "rebuild"
183 error gyp ERR! cwd /home/pi/.node-red/node_modules/mdns
183 error gyp ERR! node -v v16.18.1
183 error gyp ERR! node-gyp -v v3.8.0
183 error gyp ERR! not ok
184 verbose exit 1
185 timing npm Completed in 7291ms
186 verbose unfinished npm timer reify 1672062522615
187 verbose unfinished npm timer reify:build 1672062528561
188 verbose unfinished npm timer build 1672062528563
189 verbose unfinished npm timer build:deps 1672062528563
190 verbose unfinished npm timer build:run:install 1672062528593
191 verbose unfinished npm timer build:run:install:node_modules/leveldown 1672062528618
192 verbose unfinished npm timer build:run:install:node_modules/mdns 1672062528642
193 verbose code 1
194 error A complete log of this run can be found in:
194 error /home/pi/.npm/_logs/2022-12-26T13_48_42_509Z-debug-0.log
Any idea?
Thanks in advance for your help