Code Monkey home page Code Monkey logo

Comments (15)

AnTeBiOss avatar AnTeBiOss commented on May 30, 2024 1

Thank you for driving me on it. I guess it is totally outdated last update on pendant was 5 years ago ... I have made a brand new cncjs install and i guess my hope i flying away that seems to complicated for me without any help ...
Thank you for giving me answer

from cncjs-pendant-ps3.

balthisar avatar balthisar commented on May 30, 2024 1

@AnTeBiOss, you might post a bug report over at its own repository, instead of this one.

The fix should be, though, to cd into the cnc-js-pendant-gamepad directory and perform tsc, which will make those missing files. (That's my fault, I need to make the package installer do that automatically.)

from cncjs-pendant-ps3.

emcniece avatar emcniece commented on May 30, 2024

Hi, that looks like Python 2 syntax, and I bet you have Python 3 installed. What does /usr/bin/python -V print?

from cncjs-pendant-ps3.

AnTeBiOss avatar AnTeBiOss commented on May 30, 2024

Effectively it gives me : Python 3.9.2
How to get the good version ?

from cncjs-pendant-ps3.

AnTeBiOss avatar AnTeBiOss commented on May 30, 2024

Ok, i get python 2.7 but the error list is just incredible :/

from cncjs-pendant-ps3.

emcniece avatar emcniece commented on May 30, 2024

Yes, you need both versions installed. Some libraries will use Python 2, others will use 3.

Do you have aliases set? What does this print?

which python2
which python3

from cncjs-pendant-ps3.

AnTeBiOss avatar AnTeBiOss commented on May 30, 2024

Twice gave me :

pi@raspberrypi:~ $ which python2
/usr/bin/python2

pi@raspberrypi:~ $ which python3
/usr/bin/python3

from cncjs-pendant-ps3.

emcniece avatar emcniece commented on May 30, 2024

That looks good, thank you. The problem here is that a dependency (node-gyp) is not using the right Python version, I'm not sure why. Issues like this are often due to discrepancies in how Python is installed. It could also be caused by outdated versions in package.json.

I don't have any ideas on how to fix this at the moment, but you might try searching for something like "node-gyp rebuild Error: Command failed: /usr/bin/python -c import sys".

from cncjs-pendant-ps3.

AnTeBiOss avatar AnTeBiOss commented on May 30, 2024

Here is the result of the install :

pi@raspberrypi:~ $ sudo npm install -g cncjs-pendant-ps3 --unsafe-perm
npm WARN deprecated [email protected]: This version is no longer supported, to receive security updates and bug fixes upgrade to the latest version.
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: Please use the native JSON object instead of JSON 3
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated [email protected]: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated [email protected]: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/cncjs-pendant-ps3/node_modules/node-hid
npm ERR! command failed
npm ERR! command sh -c prebuild-install || node-gyp rebuild
npm ERR! make : on entre dans le répertoire « /usr/local/lib/node_modules/cncjs-pendant-ps3/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 : on quitte le répertoire « /usr/local/lib/node_modules/cncjs-pendant-ps3/node_modules/node-hid/build »
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | arm
npm ERR! gyp info spawn /usr/bin/python2
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/cncjs-pendant-ps3/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   '/usr/local/lib/node_modules/cncjs-pendant-ps3/node_modules/node-hid/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/cncjs-pendant-ps3/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/root/.node-gyp/12.22.5/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=/root/.node-gyp/12.22.5',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/cncjs-pendant-ps3/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/root/.node-gyp/12.22.5/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/usr/local/lib/node_modules/cncjs-pendant-ps3/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: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   203 |       Nan::GetCurrentContext()->Global()->Get(Nan::New<String>("Buffer").ToLocalChecked() )
npm ERR!       |                                                                                           ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3553:51: note: declared here
npm ERR!  3553 |   V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
npm ERR!       |                                                   ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
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 /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:4281:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const’
npm ERR!  4281 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
npm ERR!       |                                            ^~~~~~~~~~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:4281:44: note:   candidate expects 3 arguments, 2 provided
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:4284:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const’
npm ERR!  4284 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
npm ERR!       |                                            ^~~~~~~~~~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:4284: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:1744:3: note: declared here
npm ERR!  1744 |   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: warning: ‘bool v8::Object::Set(uint32_t, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   280 |     retval->Set(i, Nan::New<Integer>(buff_read[i]));
npm ERR!       |                                                   ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3508:22: note: declared here
npm ERR!  3508 |                 bool Set(uint32_t index, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
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: warning: ‘bool v8::Object::Set(uint32_t, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   305 |     retval->Set(i, Nan::New<Integer>(buff_read[i]));
npm ERR!       |                                                   ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3508:22: note: declared here
npm ERR!  3508 |                 bool Set(uint32_t index, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
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: warning: ‘bool v8::Object::Set(uint32_t, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   339 |     retval->Set(i, Nan::New<Integer>(buf[i]));
npm ERR!       |                                             ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3508:22: note: declared here
npm ERR!  3508 |                 bool Set(uint32_t index, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
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: warning: ‘v8::Local<v8::Value> v8::Object::Get(uint32_t)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   360 |     if (!messageArray->Get(i)->IsNumber()) {
npm ERR!       |                             ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3557:51: note: declared here
npm ERR!  3557 |   V8_DEPRECATED("Use maybe version", Local<Value> Get(uint32_t index));
npm ERR!       |                                                   ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/HID.cc:363:58: warning: ‘v8::Local<v8::Value> v8::Object::Get(uint32_t)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   363 |     message.push_back((unsigned char) messageArray->Get(i)->Int32Value());
npm ERR!       |                                                          ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3557:51: note: declared here
npm ERR!  3557 |   V8_DEPRECATED("Use maybe version", Local<Value> Get(uint32_t index));
npm ERR!       |                                                   ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/HID.cc:363:72: error: no matching function for call to ‘v8::Value::Int32Value()’
npm ERR!   363 |     message.push_back((unsigned char) messageArray->Get(i)->Int32Value());
npm ERR!       |                                                                        ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:2709:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
npm ERR!  2709 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
npm ERR!       |                                        ^~~~~~~~~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:2709:40: note:   candidate expects 1 argument, 0 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 /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:2709:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
npm ERR!  2709 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
npm ERR!       |                                        ^~~~~~~~~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:2709: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 /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:2709:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
npm ERR!  2709 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
npm ERR!       |                                        ^~~~~~~~~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:2709: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 /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3158:5: note: candidate: ‘v8::String::Value::Value(v8::Isolate*, v8::Local<v8::Value>)’
npm ERR!  3158 |     Value(Isolate* isolate, Local<v8::Value> obj);
npm ERR!       |     ^~~~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3158: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 /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:2709:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
npm ERR!  2709 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
npm ERR!       |                                        ^~~~~~~~~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:2709: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: warning: ‘v8::Local<v8::Value> v8::Object::Get(uint32_t)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   468 |       if (!messageArray->Get(i)->IsNumber()) {
npm ERR!       |                               ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3557:51: note: declared here
npm ERR!  3557 |   V8_DEPRECATED("Use maybe version", Local<Value> Get(uint32_t index));
npm ERR!       |                                                   ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/HID.cc:471:60: warning: ‘v8::Local<v8::Value> v8::Object::Get(uint32_t)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   471 |       message.push_back((unsigned char) messageArray->Get(i)->Int32Value());
npm ERR!       |                                                            ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3557:51: note: declared here
npm ERR!  3557 |   V8_DEPRECATED("Use maybe version", Local<Value> Get(uint32_t index));
npm ERR!       |                                                   ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/HID.cc:471:74: error: no matching function for call to ‘v8::Value::Int32Value()’
npm ERR!   471 |       message.push_back((unsigned char) messageArray->Get(i)->Int32Value());
npm ERR!       |                                                                          ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:2709:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
npm ERR!  2709 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
npm ERR!       |                                        ^~~~~~~~~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:2709:40: note:   candidate expects 1 argument, 0 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: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   505 |       Nan::New<String>(narrow(wstr).c_str()).ToLocalChecked());
npm ERR!       |                                                              ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3499:22: note: declared here
npm ERR!  3499 |                 bool Set(Local<Value> key, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/HID.cc:509:62: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   509 |       Nan::New<String>(narrow(wstr).c_str()).ToLocalChecked());
npm ERR!       |                                                              ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3499:22: note: declared here
npm ERR!  3499 |                 bool Set(Local<Value> key, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/HID.cc:513:62: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   513 |       Nan::New<String>(narrow(wstr).c_str()).ToLocalChecked());
npm ERR!       |                                                              ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3499:22: note: declared here
npm ERR!  3499 |                 bool Set(Local<Value> key, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
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 /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:2709:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
npm ERR!  2709 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
npm ERR!       |                                        ^~~~~~~~~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:2709: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 /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:2709:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
npm ERR!  2709 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
npm ERR!       |                                        ^~~~~~~~~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:2709:40: note:   candidate expects 1 argument, 0 provided
npm ERR! ../src/HID.cc:551:101: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   551 |     deviceInfo->Set(Nan::New<String>("vendorId").ToLocalChecked(), Nan::New<Integer>(dev->vendor_id));
npm ERR!       |                                                                                                     ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3499:22: note: declared here
npm ERR!  3499 |                 bool Set(Local<Value> key, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/HID.cc:552:103: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   552 |     deviceInfo->Set(Nan::New<String>("productId").ToLocalChecked(), Nan::New<Integer>(dev->product_id));
npm ERR!       |                                                                                                       ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3499:22: note: declared here
npm ERR!  3499 |                 bool Set(Local<Value> key, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/HID.cc:554:110: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   554 |       deviceInfo->Set(Nan::New<String>("path").ToLocalChecked(), Nan::New<String>(dev->path).ToLocalChecked());
npm ERR!       |                                                                                                              ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3499:22: note: declared here
npm ERR!  3499 |                 bool Set(Local<Value> key, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/HID.cc:557:143: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   557 |       deviceInfo->Set(Nan::New<String>("serialNumber").ToLocalChecked(), Nan::New<String>(narrow(dev->serial_number).c_str()).ToLocalChecked());
npm ERR!       |                                                                                                                                               ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3499:22: note: declared here
npm ERR!  3499 |                 bool Set(Local<Value> key, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/HID.cc:560:149: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
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 /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3499:22: note: declared here
npm ERR!  3499 |                 bool Set(Local<Value> key, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/HID.cc:563:139: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
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 /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3499:22: note: declared here
npm ERR!  3499 |                 bool Set(Local<Value> key, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/HID.cc:565:105: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   565 |     deviceInfo->Set(Nan::New<String>("release").ToLocalChecked(), Nan::New<Integer>(dev->release_number));
npm ERR!       |                                                                                                         ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3499:22: note: declared here
npm ERR!  3499 |                 bool Set(Local<Value> key, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/HID.cc:566:109: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   566 |     deviceInfo->Set(Nan::New<String>("interface").ToLocalChecked(), Nan::New<Integer>(dev->interface_number));
npm ERR!       |                                                                                                             ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3499:22: note: declared here
npm ERR!  3499 |                 bool Set(Local<Value> key, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/HID.cc:568:107: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   568 |         deviceInfo->Set(Nan::New<String>("usagePage").ToLocalChecked(), Nan::New<Integer>(dev->usage_page));
npm ERR!       |                                                                                                           ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3499:22: note: declared here
npm ERR!  3499 |                 bool Set(Local<Value> key, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/HID.cc:571:98: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   571 |         deviceInfo->Set(Nan::New<String>("usage").ToLocalChecked(), Nan::New<Integer>(dev->usage));
npm ERR!       |                                                                                                  ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3499:22: note: declared here
npm ERR!  3499 |                 bool Set(Local<Value> key, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/HID.cc:573:36: warning: ‘bool v8::Object::Set(uint32_t, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   573 |     retval->Set(count++, deviceInfo);
npm ERR!       |                                    ^
npm ERR! In file included from /root/.node-gyp/12.22.5/include/node/v8-internal.h:14,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/v8.h:27,
npm ERR!                  from /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:3508:22: note: declared here
npm ERR!  3508 |                 bool Set(uint32_t index, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/HID.cc: In static member function ‘static void HID::Initialize(v8::Local<v8::Object>)’:
npm ERR! ../src/HID.cc:596:31: warning: ‘void node::AtExit(void (*)(void*), void*)’ is deprecated: Use the three-argument variant of AtExit() or AddEnvironmentCleanupHook() [-Wdeprecated-declarations]
npm ERR!   596 |   node::AtExit(deinitialize, 0);
npm ERR!       |                               ^
npm ERR! In file included from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/node.h:830:22: note: declared here
npm ERR!   830 |     NODE_EXTERN void AtExit(void (*cb)(void* arg), void* arg = nullptr));
npm ERR!       |                      ^~~~~~
npm ERR! /root/.node-gyp/12.22.5/include/node/node.h:102:42: note: in definition of macro ‘NODE_DEPRECATED’
npm ERR!   102 |     __attribute__((deprecated(message))) declarator
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 /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:6126:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
npm ERR!  6126 |   V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
npm ERR!       |                                              ^~~~~~~~~~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:6126: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 /root/.node-gyp/12.22.5/include/node/node.h:67,
npm ERR!                  from ../src/HID.cc:30:
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:6126:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
npm ERR!  6126 |   V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
npm ERR!       |                                              ^~~~~~~~~~~
npm ERR! /root/.node-gyp/12.22.5/include/node/v8.h:6126: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! /root/.node-gyp/12.22.5/include/node/node.h:736: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!   736 |       (node::addon_register_func) (regfunc),                          \
npm ERR!       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /root/.node-gyp/12.22.5/include/node/node.h:770:3: note: in expansion of macro ‘NODE_MODULE_X’
npm ERR!   770 |   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:118 : Release/obj.target/HID/src/HID.o] Erreur 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/local/lib/node_modules/cncjs-pendant-ps3/node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
npm ERR! gyp ERR! System Linux 5.15.32-v7l+
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/cncjs-pendant-ps3/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /usr/local/lib/node_modules/cncjs-pendant-ps3/node_modules/node-hid
npm ERR! gyp ERR! node -v v12.22.5
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-05-03T16_41_48_113Z-debug.log

from cncjs-pendant-ps3.

MitchBradley avatar MitchBradley commented on May 30, 2024

The problem is in the "node-hid" module. Its purpose is to give the program direct access to USB "human input devices" - like keyboards - instead of letting the internal operating system driver handle them. That module has been outdated for years, and attempts to switch to a more recent version have been frustratingly difficult.

Several years ago I tried to fix cncjs-pendant-keyboard which also uses node-hid in a similar manner. I eventually gave up because there were just too many tricky details. I knew that even if I "fixed" it, it would break the next time that someone else tried to use it, so I would waste a lot of time trying to help people who would require a lot of handholding and even then might not succeed. The super-tricky problem is that, by going directly to the USB layer and thus bypassing the operating system's input layer, the program has to content with a lot of low-level details that professional (paid) programmers spend months refining so they work just right. The interface at that level is not clean and simple, but rather has a lot of "knobs" that must be handled just right if the system is to work robustly. Working at that level, it is not so difficult to get the program to work once in one environment, but very difficult to make it work for everybody and to continue to work as software versions change.

Quite a few of the cncjs pendants are in the category of "the author got them working once, "helpfully" posted their work, then disappeared, leaving other people to deal with the long-term fallout". Basically, any pendant that has not had recent commits should be considered suspect.

from cncjs-pendant-ps3.

AnTeBiOss avatar AnTeBiOss commented on May 30, 2024

Thanks for that feedback :) I just was dreaming about something cool with my cnc ... I will do it in an otherway :)

from cncjs-pendant-ps3.

AnTeBiOss avatar AnTeBiOss commented on May 30, 2024

Hi, don't want to give up so fast seems some fork would work better as @balthisar one

CNCJS-pendant-gamepad

But gave this error on my PI

pi@raspberrypi:~/cncjs-pendant-gamepad $ bin/cncjs-pendant-gamepad.js -p /dev/ttyUSB0 -b 115200 -t grbl -vv run 
node:internal/errors:465
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/pi/cncjs-pendant-gamepad/lib/console.js' imported from /home/pi/cncjs-pendant-gamepad/bin/cncjs-pendant-gamepad.js
    at new NodeError (node:internal/errors:372:5)
    at finalizeResolution (node:internal/modules/esm/resolve:437:11)
    at moduleResolve (node:internal/modules/esm/resolve:1009:10)
    at defaultResolve (node:internal/modules/esm/resolve:1218:11)
    at ESMLoader.resolve (node:internal/modules/esm/loader:580:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:294:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:80:40)
    at link (node:internal/modules/esm/module_job:78:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

My some lights on it ?

Thanks for reading

from cncjs-pendant-ps3.

AnTeBiOss avatar AnTeBiOss commented on May 30, 2024

OMG it seems to work well :)
sorry for the repository missing for bug but the issues was not enable.

@balthisar could you tell me how to configure Button map as i would like to use it ?

Thanks a lot !!!

from cncjs-pendant-ps3.

balthisar avatar balthisar commented on May 30, 2024

@AnTeBiOss, you can have a look at actions.ts to see how buttons map to actions. Perform tsc after every change to compile the typescript. Take a look at gamepad_controller.ts if your gamepad isn't one of the ones I tested with. You can enable more verbose logging to see the actual outputs in your console when you press buttons on your own gamepad.

from cncjs-pendant-ps3.

AnTeBiOss avatar AnTeBiOss commented on May 30, 2024

Thank you for answer @balthisar , i will try but i'm not that dev killer i want :)
I have open an issue on you fork since you have enable it. But i will feedback my tries !

from cncjs-pendant-ps3.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.