ZigBee Example Code Issues

Hello,

I am trying to use the js example (https://github.com/matrix-io/matrix-malos-zigbee/tree/master/src/js_test) to control a light with zigbee. However, when installing the zmq dependency from the package.json file with npm the following error occurs:

> zmq@2.15.3 install /usr/src/app/matrix-malos-zigbee/src/js_test/node_modules/zmq
> node-gyp rebuild

make: Entering directory '/usr/src/app/matrix-malos-zigbee/src/js_test/node_modules/zmq/build'
  CXX(target) Release/obj.target/zmq/binding.o
In file included from ../../nan/nan.h:190,
                 from ../binding.cc:38:
../../nan/nan_maybe_43_inl.h: In function 'Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)':
../../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 ../../nan/nan_converters.h:59,
                 from ../../nan/nan.h:195,
                 from ../binding.cc:38:
../../nan/nan_converters_43_inl.h: In static member function 'static Nan::imp::ToFactoryBase<v8::Boolean>::return_t Nan::imp::ToFactory<v8::Boolean>::convert(v8::Local<v8::Value>)':
../../nan/nan_converters_43_inl.h:15:45: error: no matching function for call to 'v8::Value::ToBoolean(v8::Local<v8::Context>)'
   return val->To ## TYPE(GetCurrentContext());                                 \
                                             ^
../../nan/nan_converters_43_inl.h:18:1: note: in expansion of macro 'X'
 X(Boolean)
 ^
In file included from ../binding.cc:24:
/root/.cache/node-gyp/13.10.1/include/node/v8.h:2762:18: note: candidate: 'v8::Local<v8::Boolean> v8::Value::ToBoolean(v8::Isolate*) const'
   Local<Boolean> ToBoolean(Isolate* isolate) const;
                  ^~~~~~~~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:2762:18: note:   no known conversion for argument 1 from 'v8::Local<v8::Context>' to 'v8::Isolate*'
In file included from ../../nan/nan_converters.h:59,
                 from ../../nan/nan.h:195,
                 from ../binding.cc:38:
../../nan/nan_converters_43_inl.h: In static member function 'static Nan::imp::ValueFactoryBase<bool>::return_t Nan::imp::ToFactory<bool>::convert(v8::Local<v8::Value>)':
../../nan/nan_converters_43_inl.h:31:48: error: no matching function for call to 'v8::Value::BooleanValue(v8::Local<v8::Context>)'
   return val->NAME ## Value(GetCurrentContext());                              \
                                                ^
../../nan/nan_converters_43_inl.h:34:1: note: in expansion of macro 'X'
 X(bool, Boolean)
 ^
In file included from ../binding.cc:24:
/root/.cache/node-gyp/13.10.1/include/node/v8.h:2771:8: note: candidate: 'bool v8::Value::BooleanValue(v8::Isolate*) const'
   bool BooleanValue(Isolate* isolate) const;
        ^~~~~~~~~~~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:2771:8: note:   no known conversion for argument 1 from 'v8::Local<v8::Context>' to 'v8::Isolate*'
In file included from ../../nan/nan_new.h:189,
                 from ../../nan/nan.h:196,
                 from ../binding.cc:38:
../../nan/nan_implementation_12_inl.h: In static member function 'static 

...

In file included from ../binding.cc:24:
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note: candidate: 'v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)'
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note:   candidate expects 2 arguments, 1 provided
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note: candidate: 'v8::MaybeLocal<v8::Value> v
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note:   candidate expects 2 arguments, 1 provided
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note: candidate: 'v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)'
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note:   candidate expects 2 arguments, 1 provided
In file included from ../binding.cc:38:
../../nan/nan.h:1404:25: error: expected primary-expression before '>' token
         .As<v8::Function>());
                         ^
../../nan/nan.h:1404:27: error: expected primary-expression before ')' token
         .As<v8::Function>());
                           ^
../../nan/nan.h: In member function 'bool Nan::Callback::IsEmpty() const':
../../nan/nan.h:1409:43: error: no matching function for call to 'v8::Object::Get(const uint32_t&)'
     return New(handle)->Get(kCallbackIndex)->IsUndefined();
                                           ^
In file included from ../binding.cc:24:
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note: candidate: 'v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)'
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note:   candidate expects 2 arguments, 1 provided
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note: candidate: 'v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)'
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note:   candidate expects 2 arguments, 1 provided
In file included from ../binding.cc:38:
../../nan/nan.h: In member function 'v8::Local<v8::Value> Nan::Callback::Call_(v8::Isolate*, v8::Local<v8::Object>, int, v8::Local<v8::Value>*) const':
../../nan/nan.h:1447:27: error: no matching function for call to 'v8::Object::Get(const uint32_t&)'
         Get(kCallbackIndex).As<v8::Function>();
                           ^
In file included from ../binding.cc:24:
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note: candidate: 'v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)'
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note:   candidate expects 2 arguments, 1 provided
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note: candidate: 'v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)'
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note:   candidate expects 2 arguments, 1 provided
In file included from ../binding.cc:38:
../../nan/nan.h:1447:44: error: expected primary-expression before '>' token
         Get(kCallbackIndex).As<v8::Function>();
                                            ^
../../nan/nan.h:1447:46: error: expected primary-expression before ')' token
         Get(kCallbackIndex).As<v8::Function>();
                                              ^
../../nan/nan.h:1463:5: warning: 'v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
     ));
     ^
In file included from ../binding.cc:25:
/root/.cache/node-gyp/13.10.1/include/node/node.h:188:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^~~~~~~~~~~~
/root/.cache/node-gyp/13.10.1/include/node/node.h:107:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
In file included from ../binding.cc:38:
../../nan/nan.h:1463:5: warning: 'v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
     ));
     ^
In file included from ../binding.cc:25:
/root/.cache/node-gyp/13.10.1/include/node/node.h:188:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^~~~~~~~~~~~
/root/.cache/node-gyp/13.10.1/include/node/node.h:107:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
In file included from ../binding.cc:38:
../../nan/nan.h: In member function 'void Nan::AsyncWorker::SaveToPersistent(const char*, const v8::Local<v8::Value>&)':
../../nan/nan.h:1518:64: error: no matching function for call to 'v8::Object::Set(v8::Local<v8::String>, const v8::Local<v8::Value>&)'
     New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
                                                                ^
In file included from ../binding.cc:24:
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3547: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,
                                     ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3547:37: note:   candidate expects 3 arguments, 2 provided
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3550: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,
                                     ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3550:37: note:   candidate expects 3 arguments, 2 provided
In file included from ../binding.cc:38:
../../nan/nan.h: In member function 'void Nan::AsyncWorker::SaveToPersistent(const v8::Local<v8::String>&, const v8::Local<v8::Value>&)':
../../nan/nan.h:1524:42: error: no matching function for call to 'v8::Object::Set(const v8::Local<v8::String>&, const v8::Local<v8::Value>&)'
     New(persistentHandle)->Set(key, value);
                                          ^
In file included from ../binding.cc:24:
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3547: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,
                                     ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3547:37: note:   candidate expects 3 arguments, 2 provided
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3550: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,
                                     ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3550:37: note:   candidate expects 3 arguments, 2 provided
In file included from ../binding.cc:38:
../../nan/nan.h: In member function 'void Nan::AsyncWorker::SaveToPersistent(uint32_t, const v8::Local<v8::Value>&)':
../../nan/nan.h:1530:44: error: no matching function for call to 'v8::Object::Set(uint32_t&, const v8::Local<v8::Value>&)'
     New(persistentHandle)->Set(index, value);
                                            ^
In file included from ../binding.cc:24:
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3547: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,
                                     ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3547:37: note:   candidate expects 3 arguments, 2 provided
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3550: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,
                                     ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3550:37: note:   candidate expects 3 arguments, 2 provided
In file included from ../binding.cc:38:
../../nan/nan.h: In member function 'v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const char*) const':
../../nan/nan.h:1536:61: error: no matching function for call to 'v8::Object::Get(v8::Local<v8::String>)'
         New(persistentHandle)->Get(New(key).ToLocalChecked()));
                                                             ^
In file included from ../binding.cc:24:
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note: candidate: 'v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)'
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note:   candidate expects 2 arguments, 1 provided
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note: candidate: 'v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)'
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note:   candidate expects 2 arguments, 1 provided
In file included from ../binding.cc:38:
../../nan/nan.h: In member function 'v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const v8::Local<v8::String>&) const':
../../nan/nan.h:1542:55: error: no matching function for call to 'v8::Object::Get(const v8::Local<v8::String>&)'
     return scope.Escape(New(persistentHandle)->Get(key));
                                                       ^
In file included from ../binding.cc:24:
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note: candidate: 'v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)'
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note:   candidate expects 2 arguments, 1 provided
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note: candidate: 'v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)'
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note:   candidate expects 2 arguments, 1 provided
In file included from ../binding.cc:38:
../../nan/nan.h: In member function 'v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(uint32_t) const':
../../nan/nan.h:1547:57: error: no matching function for call to 'v8::Object::Get(uint32_t&)'
     return scope.Escape(New(persistentHandle)->Get(index));
                                                         ^
In file included from ../binding.cc:24:
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note: candidate: 'v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)'
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note:   candidate expects 2 arguments, 1 provided
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note: candidate: 'v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)'
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note:   candidate expects 2 arguments, 1 provided
In file included from ../binding.cc:38:
../../nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker*)':
../../nan/nan.h:1706: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 /root/.cache/node-gyp/13.10.1/include/node/node_object_wrap.h:26,
                 from ../../nan/nan.h:49,
                 from ../binding.cc:38:
../../nan/nan_object_wrap.h: In destructor 'virtual Nan::ObjectWrap::~ObjectWrap()':
../../nan/nan_object_wrap.h:24:25: error: 'class Nan::Persistent<v8::Object>' has no member named 'IsNearDeath'
     assert(persistent().IsNearDeath());
                         ^~~~~~~~~~~
In file included from ../../nan/nan.h:2192,
                 from ../binding.cc:38:
../../nan/nan_object_wrap.h: In member function 'void Nan::ObjectWrap::MakeWeak()':
../../nan/nan_object_wrap.h:67:18: error: 'class Nan::Persistent<v8::Object>' has no member named 'MarkIndependent'
     persistent().MarkIndependent();
                  ^~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/cassert:44,
                 from /root/.cache/node-gyp/13.10.1/include/node/node_object_wrap.h:26,
                 from ../../nan/nan.h:49,
                 from ../binding.cc:38:
../../nan/nan_object_wrap.h: In static member function 'static void Nan::ObjectWrap::WeakCallback(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)':
../../nan/nan_object_wrap.h:124:26: error: 'class Nan::Persistent<v8::Object>' has no member named 'IsNearDeath'
     assert(wrap->handle_.IsNearDeath());
                          ^~~~~~~~~~~
../binding.cc: In static member function 'static void zmq::Socket::UV_MonitorCallback(uv_timer_t*, int)':
../binding.cc:533:98: warning: cast between incompatible function types from 'void (*)(uv_timer_t*, int)' {aka 'void (*)(uv_timer_s*, int)'} to 'uv_timer_cb' {aka 'void (*)(uv_timer_s*)'} [-Wcast-function-type]
       uv_timer_start(s->monitor_handle_, reinterpret_cast<uv_timer_cb>(Socket::UV_MonitorCallback), s->timer_interval_, 0);
                                                                                                  ^
../binding.cc: In static member function 'static Nan::NAN_METHOD_RETURN_TYPE zmq::Socket::Bind(Nan::NAN_METHOD_ARGS_TYPE)':
../binding.cc:766:37: 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]
                   (uv_after_work_cb)UV_BindAsyncAfter);
                                     ^~~~~~~~~~~~~~~~~
../binding.cc: In static member function 'static Nan::NAN_METHOD_RETURN_TYPE zmq::Socket::Unbind(Nan::NAN_METHOD_ARGS_TYPE)':
../binding.cc:847:37: 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]
                   (uv_after_work_cb)UV_UnbindAsyncAfter);
                                     ^~~~~~~~~~~~~~~~~~~
../binding.cc: In destructor 'zmq::Socket::IncomingMessage::MessageReference::~MessageReference()':
../binding.cc:999:54: warning: throw will always call terminate() [-Wterminate]
               throw std::runtime_error(ErrorMessage());
                                                      ^
../binding.cc:999:54: note: in C++11 destructors default to noexcept
../binding.cc: In static member function 'static Nan::NAN_METHOD_RETURN_TYPE zmq::Socket::Monitor(Nan::NAN_METHOD_ARGS_TYPE)':
../binding.cc:1049:103: warning: cast between incompatible function types from 'void (*)(uv_timer_t*, int)' {aka 'void (*)(uv_timer_s*, int)'} to 'uv_timer_cb' {aka 'void (*)(uv_timer_s*)'} [-Wcast-function-type]
       uv_timer_start(socket->monitor_handle_, reinterpret_cast<uv_timer_cb>(Socket::UV_MonitorCallback), timer_interval, 0);
                                                                                                       ^
../binding.cc: In destructor 'zmq::Socket::OutgoingMessage::~OutgoingMessage()':
../binding.cc:1205:50: warning: throw will always call terminate() [-Wterminate]
           throw std::runtime_error(ErrorMessage());
                                                  ^
../binding.cc:1205:50: note: in C++11 destructors default to noexcept
../binding.cc: In constructor 'zmq::Socket::OutgoingMessage::BufferReference::BufferReference(v8::Local<v8::Object>)':
../binding.cc:1217:78: warning: cast between incompatible function types from 'void (*)(uv_async_t*, int)' {aka 'void (*)(uv_async_s*, int)'} to 'uv_async_cb' {aka 'void (*)(uv_async_s*)'} [-Wcast-function-type]
             uv_async_init(loop, &async, reinterpret_cast<uv_async_cb>(cleanup));
                                                                              ^
../binding.cc: In static member function 'static Nan::NAN_METHOD_RETURN_TYPE zmq::Socket::Sendv(Nan::NAN_METHOD_ARGS_TYPE)':
../binding.cc:1285:39: error: no matching function for call to 'v8::Array::Get(size_t&)'
       Local<Object> buf = batch->Get(i).As<Object>();
                                       ^
In file included from ../binding.cc:24:
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note: candidate: 'v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)'
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note:   candidate expects 2 arguments, 1 provided
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note: candidate: 'v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)'
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note:   candidate expects 2 arguments, 1 provided
../binding.cc:1285:50: error: expected primary-expression before '>' token
       Local<Object> buf = batch->Get(i).As<Object>();
                                                  ^
../binding.cc:1285:52: error: expected primary-expression before ')' token
       Local<Object> buf = batch->Get(i).As<Object>();
                                                    ^
../binding.cc:1286:48: error: no matching function for call to 'v8::Array::Get(size_t)'
       Local<Number> flagsObj = batch->Get(i + 1).As<Number>();
                                                ^
In file included from ../binding.cc:24:
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note: candidate: 'v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)'
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note:   candidate expects 2 arguments, 1 provided
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note: candidate: 'v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)'
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note:   candidate expects 2 arguments, 1 provided
../binding.cc:1286:59: error: expected primary-expression before '>' token
       Local<Number> flagsObj = batch->Get(i + 1).As<Number>();
                                                           ^
../binding.cc:1286:61: error: expected primary-expression before ')' token
       Local<Number> flagsObj = batch->Get(i + 1).As<Number>();
                                                             ^
In file included from ../binding.cc:25:
../binding.cc: At global scope:
/root/.cache/node-gyp/13.10.1/include/node/node.h:618:43: warning: cast between incompatible function types from 'void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)' {aka 'void (*)(v8::Local<v8::Object>)'}to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
       (node::addon_register_func) (regfunc),                          \
                                           ^
/root/.cache/node-gyp/13.10.1/include/node/node.h:652:3: note: in expansion of macro 'NODE_MODULE_X'
   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
   ^~~~~~~~~~~~~
../binding.cc:1619:1: note: in expansion of macro 'NODE_MODULE'
 NODE_MODULE(zmq, init)
 ^~~~~~~~~~~
In file included from ../binding.cc:24:
/root/.cache/node-gyp/13.10.1/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap;T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]':
/root/.cache/node-gyp/13.10.1/include/node/node_object_wrap.h:85:78:   required from here
/root/.cache/node-gyp/13.10.1/include/node/v8.h:10400:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<node::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
                reinterpret_cast<Callback>(callback), type);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]':
../../nan/nan_object_wrap.h:66:61:   required from here
/root/.cache/node-gyp/13.10.1/include/node/v8.h:10400:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
In file included from ../binding.cc:38:
../../nan/nan.h: In instantiation of 'void Nan::imp::SetMethodAux(T, v8::Local<v8::String>, v8::Local<v8::FunctionTemplate>, ...) [with T = v8::Local<v8::Object>]':
../../nan/nan.h:1888:20:   required from 'void Nan::SetMethod(HandleType<T>, const char*, Nan::FunctionCallback) [with T = v8::Object; HandleType = v8::Local; Nan::FunctionCallback = void (*)(const Nan::FunctionCallbackInfo<v8::Value>&)]'
../binding.cc:1572:52:   required from here
../../nan/nan.h:1872:3: error: no matching function for call to 'v8::Object::Set(v8::Local<v8::String>&, v8::Local<v8::Function>)'
   recv->Set(name, GetFunction(tpl).ToLocalChecked());
   ^~~~
In file included from ../binding.cc:24:
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3547: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,
                                     ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3547:37: note:   candidate expects 3 arguments, 2 provided
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3550: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,
                                     ^~~
/root/.cache/node-gyp/13.10.1/include/node/v8.h:3550:37: note:   candidate expects 3 arguments, 2 provided
make: *** [zmq.target.mk:109: Release/obj.target/zmq/binding.o] Error 1
make: Leaving directory '/usr/src/app/matrix-malos-zigbee/src/js_test/node_modules/zmq/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:316:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.97-v7l+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/src/app/matrix-malos-zigbee/src/js_test/node_modules/zmq
gyp ERR! node -v v13.10.1
gyp ERR! node-gyp -v v5.0.7
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zmq@2.15.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zmq@2.15.3 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!     /root/.npm/_logs/2020-03-12T15_48_29_028Z-debug.log

I also tried to install this before which did not help:

apt-get install --yes cmake g++ git libmatrixio-malos-dev libmatrixio-protos-dev libmatrixio-creator-hal libmatrixio-creator-hal-dev libtool pkg-config build-essential autoconf automake

wget https://github.com/zeromq/zeromq4-1/releases/download/v4.1.7/zeromq-4.1.7.tar.gz
tar -zxvf zeromq-4.1.7.tar.gz
cd zeromq-4.1.7/
./configure
make
make install
ldconfig

Thanks.

Hi @leiropi,

What version of node are you using? 8.6 works best with zmq. You can follow the steps here to install it.

Have you tried to install zmq separately with

npm install zmq --save

This worked for me when I last tried.

Let me know how it goes.

Best,
Samreen

Thanks, when using node 8 it is working. However, I do not think that this is a good solution since node 8 is not supported anymore.

Edit: The npm package zeromq can be used instead of zmq. It works with node 12.

1 Like