Node-red-contrib-usbhid on Raspberry Pi - anyone got it running recently?

Hey, I'm quite new to node-red and not a Linux expert...

I am (desperately) tying to get this USB RFID reader to work in node-red.

Everywhere else, it just connects and when you tap, the card ID + linefeed appears.

I think I need to install node-red-contrib-usbhid to get this to work in node-red, but not really sure.

Anyhow, it doesn't install.

Tried this:

Tried this:

No good.. Lots of errors - I'll post them ALL below.

Please someone take pity on me and help!

Cris.


Part 1

sudo npm install node-red-contrib-usbhid
npm ERR! code 1
npm ERR! path /home/talking-tree/node_modules/node-hid
npm ERR! command failed
npm ERR! command sh -c prebuild-install || node-gyp rebuild
npm ERR! make: Entering directory '/home/talking-tree/node_modules/node-hid/build'
npm ERR!   CC(target) Release/obj.target/hidapi/hidapi/libusb/hid.o
npm ERR!   AR(target) Release/obj.target/hidapi.a
npm ERR!   COPY Release/hidapi.a
npm ERR!   CXX(target) Release/obj.target/HID/src/HID.o
npm ERR! make: Leaving directory '/home/talking-tree/node_modules/node-hid/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/python3"
npm ERR! gyp WARN EACCES current user ("talking-tree") does not have permission to access the dev dir "/root/.cache/node-gyp/16.16.0"
npm ERR! gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/.node-gyp"
npm ERR! gyp http GET https://nodejs.org/download/release/v16.16.0/node-v16.16.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.16.0/node-v16.16.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v16.16.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.16.0/SHASUMS256.txt
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/talking-tree/node_modules/node-hid/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   '/tmp/.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=/tmp/.node-gyp/16.16.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/tmp/.node-gyp/16.16.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/talking-tree/node_modules/node-hid',
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! ../hidapi/libusb/hid.c: In function ‘hid_read_timeout’:
npm ERR! ../hidapi/libusb/hid.c:1078:6: warning: variable ‘bytes_read’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
npm ERR!  1078 |  int bytes_read = -1;
npm ERR!       |      ^~~~~~~~~~
npm ERR! ../src/HID.cc:67:5: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
npm ERR!    67 |     throw(JSException);
npm ERR!       |     ^~~~~
npm ERR! ../src/HID.cc:70:5: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
npm ERR!    70 |     throw(JSException);
npm ERR!       |     ^~~~~
npm ERR! ../src/HID.cc:152:3: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
npm ERR!   152 |   throw(JSException)
npm ERR!       |   ^~~~~
npm ERR! ../src/HID.cc:163:3: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
npm ERR!   163 |   throw(JSException)
npm ERR!       |   ^~~~~
npm ERR! ../src/HID.cc: In member function ‘void HID::readResultsToJSCallbackArguments(HID::ReceiveIOCB*, v8::Local<v8::Value>*)’:
npm ERR! ../src/HID.cc:203:91: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>)’
npm ERR!   203 |       Nan::GetCurrentContext()->Global()->Get(Nan::New<String>("Buffer").ToLocalChecked() )
npm ERR!       |                                                                                           ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4007:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
npm ERR!  4007 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!       |                                           ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4007:43: note:   candidate expects 2 arguments, 1 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4010:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
npm ERR!  4010 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!       |                                           ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4010:43: note:   candidate expects 2 arguments, 1 provided
npm ERR! ../src/HID.cc:207:74: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Local<v8::Value> [1])’
npm ERR!   207 |     Local<Object> buf = nodeBufConstructor->NewInstance(1, nodeBufferArgs);
npm ERR!       |                                                                          ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4759:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const’
npm ERR!  4759 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
npm ERR!       |                                            ^~~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4759:44: note:   candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4762:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const’
npm ERR!  4762 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
npm ERR!       |                                            ^~~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4762:44: note:   candidate expects 1 argument, 2 provided
npm ERR! ../src/HID.cc: In static member function ‘static void HID::recvAsyncDone(uv_work_t*)’:
npm ERR! ../src/HID.cc:231:32: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
npm ERR!   231 |   iocb->_callback->Call(2, argv);
npm ERR!       |                                ^
npm ERR! In file included from ../src/HID.cc:31:
npm ERR! ../../nan/nan.h:1746:3: note: declared here
npm ERR!  1746 |   Call(int argc, v8::Local<v8::Value> argv[]) const {
npm ERR!       |   ^~~~
npm ERR! ../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::read(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/HID.cc:257:52: 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]
npm ERR!   257 |   uv_queue_work(uv_default_loop(), req, recvAsync, (uv_after_work_cb)recvAsyncDone);
npm ERR!       |                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::readSync(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/HID.cc:280:51: error: no matching function for call to ‘v8::Array::Set(int&, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
npm ERR!   280 |     retval->Set(i, Nan::New<Integer>(buff_read[i]));
npm ERR!       |                                                   ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!  3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!  3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::readTimeout(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/HID.cc:305:51: error: no matching function for call to ‘v8::Array::Set(int&, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
npm ERR!   305 |     retval->Set(i, Nan::New<Integer>(buff_read[i]));
npm ERR!       |                                                   ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!  3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!  3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::getFeatureReport(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/HID.cc:339:45: error: no matching function for call to ‘v8::Array::Set(int&, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
npm ERR!   339 |     retval->Set(i, Nan::New<Integer>(buf[i]));
npm ERR!       |                                             ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!  3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!  3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::sendFeatureReport(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/HID.cc:360:29: error: no matching function for call to ‘v8::Array::Get(unsigned int&)’
npm ERR!   360 |     if (!messageArray->Get(i)->IsNumber()) {
npm ERR!       |                             ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4007:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
npm ERR!  4007 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!       |                                           ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4007:43: note:   candidate expects 2 arguments, 1 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4010:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
npm ERR!  4010 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!       |                                           ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4010:43: note:   candidate expects 2 arguments, 1 provided
npm ERR! ../src/HID.cc:363:58: error: no matching function for call to ‘v8::Array::Get(unsigned int&)’
npm ERR!   363 |     message.push_back((unsigned char) messageArray->Get(i)->Int32Value());
npm ERR!       |                                                          ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4007:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
npm ERR!  4007 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!       |                                           ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4007:43: note:   candidate expects 2 arguments, 1 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4010:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
npm ERR!  4010 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!       |                                           ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4010:43: note:   candidate expects 2 arguments, 1 provided
npm ERR! ../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::New(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/HID.cc:404:46: error: no matching function for call to ‘v8::Value::Int32Value()’
npm ERR!   404 |       int32_t vendorId = info[0]->Int32Value();
npm ERR!       |                                              ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3107:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
npm ERR!  3107 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
npm ERR!       |                                        ^~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3107:40: note:   candidate expects 1 argument, 0 provided
npm ERR! ../src/HID.cc:405:47: error: no matching function for call to ‘v8::Value::Int32Value()’
npm ERR!   405 |       int32_t productId = info[1]->Int32Value();
npm ERR!       |                                               ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3107:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
npm ERR!  3107 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
npm ERR!       |                                        ^~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3107:40: note:   candidate expects 1 argument, 0 provided
npm ERR! ../src/HID.cc:409:62: error: no matching function for call to ‘v8::String::Value::Value(v8::Local<v8::Value>)’
npm ERR!   409 |         serialPointer = (wchar_t*) *v8::String::Value(info[2]);
npm ERR!       |                                                              ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3604:5: note: candidate: ‘v8::String::Value::Value(v8::Isolate*, v8::Local<v8::Value>)’
npm ERR!  3604 |     Value(Isolate* isolate, Local<v8::Value> obj);
npm ERR!       |     ^~~~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3604:5: note:   candidate expects 2 arguments, 1 provided
npm ERR! ../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::setNonBlocking(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/HID.cc:443:37: error: no matching function for call to ‘v8::Value::Int32Value()’
npm ERR!   443 |   blockStatus = info[0]->Int32Value();
npm ERR!       |                                     ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3107:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
npm ERR!  3107 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
npm ERR!       |                                        ^~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3107:40: note:   candidate expects 1 argument, 0 provided
npm ERR! ../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::write(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/HID.cc:468:31: error: no matching function for call to ‘v8::Array::Get(unsigned int&)’
npm ERR!   468 |       if (!messageArray->Get(i)->IsNumber()) {
npm ERR!       |                               ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4007:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
npm ERR!  4007 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!       |                                           ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4007:43: note:   candidate expects 2 arguments, 1 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4010:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
npm ERR!  4010 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!       |                                           ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4010:43: note:   candidate expects 2 arguments, 1 provided
npm ERR! ../src/HID.cc:471:60: error: no matching function for call to ‘v8::Array::Get(unsigned int&)’
npm ERR!   471 |       message.push_back((unsigned char) messageArray->Get(i)->Int32Value());
npm ERR!       |                                                            ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4007:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
npm ERR!  4007 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!       |                                           ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4007:43: note:   candidate expects 2 arguments, 1 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4010:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
npm ERR!  4010 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!       |                                           ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:4010:43: note:   candidate expects 2 arguments, 1 provided
npm ERR! ../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::getDeviceInfo(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/HID.cc:505:62: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, v8::Local<v8::String>)’
npm ERR!   505 |       Nan::New<String>(narrow(wstr).c_str()).ToLocalChecked());
npm ERR!       |                                                              ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!  3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!  3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/HID.cc:509:62: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, v8::Local<v8::String>)’
npm ERR!   509 |       Nan::New<String>(narrow(wstr).c_str()).ToLocalChecked());
npm ERR!       |                                                              ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!  3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!  3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/HID.cc:513:62: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, v8::Local<v8::String>)’
npm ERR!   513 |       Nan::New<String>(narrow(wstr).c_str()).ToLocalChecked());
npm ERR!       |                                                              ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!  3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!  3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::devices(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/HID.cc:535:38: error: no matching function for call to ‘v8::Value::Int32Value()’
npm ERR!   535 |       vendorId = info[0]->Int32Value();
npm ERR!       |                                      ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3107:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
npm ERR!  3107 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
npm ERR!       |                                        ^~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3107:40: note:   candidate expects 1 argument, 0 provided
npm ERR! ../src/HID.cc:536:39: error: no matching function for call to ‘v8::Value::Int32Value()’
npm ERR!   536 |       productId = info[1]->Int32Value();
npm ERR!       |                                       ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3107:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
npm ERR!  3107 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
npm ERR!       |                                        ^~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3107:40: note:   candidate expects 1 argument, 0 provided
npm ERR! ../src/HID.cc:551:101: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
npm ERR!   551 |     deviceInfo->Set(Nan::New<String>("vendorId").ToLocalChecked(), Nan::New<Integer>(dev->vendor_id));
npm ERR!       |                                                                                                     ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!  3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!  3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/HID.cc:552:103: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
npm ERR!   552 |     deviceInfo->Set(Nan::New<String>("productId").ToLocalChecked(), Nan::New<Integer>(dev->product_id));
npm ERR!       |                                                                                                       ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!  3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!  3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/HID.cc:554:110: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, v8::Local<v8::String>)’
npm ERR!   554 |       deviceInfo->Set(Nan::New<String>("path").ToLocalChecked(), Nan::New<String>(dev->path).ToLocalChecked());
npm ERR!       |                                                                                                              ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!  3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!  3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/HID.cc:557:143: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, v8::Local<v8::String>)’
npm ERR!   557 |       deviceInfo->Set(Nan::New<String>("serialNumber").ToLocalChecked(), Nan::New<String>(narrow(dev->serial_number).c_str()).ToLocalChecked());

Part 2


npm ERR!       |                                                                                                                                               ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!  3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!  3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/HID.cc:560:149: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, v8::Local<v8::String>)’
npm ERR!   560 |       deviceInfo->Set(Nan::New<String>("manufacturer").ToLocalChecked(), Nan::New<String>(narrow(dev->manufacturer_string).c_str()).ToLocalChecked());
npm ERR!       |                                                                                                                                                     ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!  3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!  3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/HID.cc:563:139: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, v8::Local<v8::String>)’
npm ERR!   563 |       deviceInfo->Set(Nan::New<String>("product").ToLocalChecked(), Nan::New<String>(narrow(dev->product_string).c_str()).ToLocalChecked());
npm ERR!       |                                                                                                                                           ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!  3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!  3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/HID.cc:565:105: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
npm ERR!   565 |     deviceInfo->Set(Nan::New<String>("release").ToLocalChecked(), Nan::New<Integer>(dev->release_number));
npm ERR!       |                                                                                                         ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!  3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!  3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/HID.cc:566:109: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
npm ERR!   566 |     deviceInfo->Set(Nan::New<String>("interface").ToLocalChecked(), Nan::New<Integer>(dev->interface_number));
npm ERR!       |                                                                                                             ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!  3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!  3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/HID.cc:568:107: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
npm ERR!   568 |         deviceInfo->Set(Nan::New<String>("usagePage").ToLocalChecked(), Nan::New<Integer>(dev->usage_page));
npm ERR!       |                                                                                                           ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!  3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!  3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/HID.cc:571:98: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
npm ERR!   571 |         deviceInfo->Set(Nan::New<String>("usage").ToLocalChecked(), Nan::New<Integer>(dev->usage));
npm ERR!       |                                                                                                  ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!  3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!  3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/HID.cc:573:36: error: no matching function for call to ‘v8::Array::Set(int, v8::Local<v8::Object>&)’
npm ERR!   573 |     retval->Set(count++, deviceInfo);
npm ERR!       |                                    ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR!  3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR!  3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!       |                                     ^~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
npm ERR! ../src/HID.cc: In static member function ‘static void HID::Initialize(v8::Local<v8::Object>)’:
npm ERR! ../src/HID.cc:596:16: error: cannot convert ‘void (*)(void*)’ to ‘node::Environment*’
npm ERR!   596 |   node::AtExit(deinitialize, 0);
npm ERR!       |                ^~~~~~~~~~~~
npm ERR!       |                |
npm ERR!       |                void (*)(void*)
npm ERR! In file included from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/node.h:939:38: note:   initializing argument 1 of ‘void node::AtExit(node::Environment*, void (*)(void*), void*)’
npm ERR!   939 | NODE_EXTERN void AtExit(Environment* env,
npm ERR!       |                         ~~~~~~~~~~~~~^~~
npm ERR! ../src/HID.cc:614:82: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
npm ERR!   614 |   target->Set(Nan::New<String>("HID").ToLocalChecked(), hidTemplate->GetFunction());
npm ERR!       |                                                                                  ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:6802:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
npm ERR!  6802 |   V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
npm ERR!       |                                              ^~~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:6802:46: note:   candidate expects 1 argument, 0 provided
npm ERR! ../src/HID.cc:616:115: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
npm ERR!   616 |   target->Set(Nan::New<String>("devices").ToLocalChecked(), Nan::New<FunctionTemplate>(HID::devices)->GetFunction());
npm ERR!       |                                                                                                                   ^
npm ERR! In file included from /tmp/.node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:6802:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
npm ERR!  6802 |   V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
npm ERR!       |                                              ^~~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.16.0/include/node/v8.h:6802:46: note:   candidate expects 1 argument, 0 provided
npm ERR! In file included from ../src/HID.cc:30:
npm ERR! ../src/HID.cc: At global scope:
npm ERR! /tmp/.node-gyp/16.16.0/include/node/node.h:847:7: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::Object>)’ to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
npm ERR!   847 |       (node::addon_register_func) (regfunc),                          \
npm ERR!       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /tmp/.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 (readability/null_usage)
npm ERR!       |   ^~~~~~~~~~~~~
npm ERR! ../src/HID.cc:629:3: note: in expansion of macro ‘NODE_MODULE’
npm ERR!   629 |   NODE_MODULE(HID, init);
npm ERR!       |   ^~~~~~~~~~~
npm ERR! make: *** [HID.target.mk:122: Release/obj.target/HID/src/HID.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/node_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:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 5.15.32-v7+
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/talking-tree/node_modules/node-hid
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

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.