Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Errors when installing #11

Open
deependdesigns opened this issue Jun 17, 2021 · 4 comments
Open

Errors when installing #11

deependdesigns opened this issue Jun 17, 2021 · 4 comments

Comments

@deependdesigns
Copy link

pi@CNC:~/cncjs-pendant-keyboard $ npm install

node-hid@0.5.7 install /home/pi/cncjs-pendant-keyboard/node_modules/node-hid
prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=10.23.0 runtime=node arch=arm platform=linux)
make: Entering directory '/home/pi/cncjs-pendant-keyboard/node_modules/node-hid/build'
CC(target) Release/obj.target/hidapi/hidapi/libusb/hid.o
../hidapi/libusb/hid.c: In function ‘hid_read_timeout’:
../hidapi/libusb/hid.c:1078:6: warning: variable ‘bytes_read’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
int bytes_read = -1;
^~~~~~~~~~
AR(target) Release/obj.target/hidapi.a
COPY Release/hidapi.a
CXX(target) Release/obj.target/HID/src/HID.o
../src/HID.cc:67:5: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
throw(JSException);
^~~~~
../src/HID.cc:70:5: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
throw(JSException);
^~~~~
../src/HID.cc:152:3: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
throw(JSException)
^~~~~
../src/HID.cc:163:3: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
throw(JSException)
^~~~~
../src/HID.cc: In member function ‘void HID::readResultsToJSCallbackArguments(HID::ReceiveIOCB*, v8::Localv8::Value)’:
../src/HID.cc:207:74: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Localv8::Value [1])’
Local buf = nodeBufConstructor->NewInstance(1, nodeBufferArgs);
^
In file included from /home/pi/.cache/node-gyp/10.23.0/include/node/node.h:63,
from ../src/HID.cc:30:
/home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:3993:44: note: candidate: ‘v8::MaybeLocalv8::Object v8::Function::NewInstance(v8::Localv8::Context, int, v8::Localv8::Value) const’
V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(
^~~~~~~~~~~
/home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:3993:44: note: candidate expects 3 arguments, 2 provided/home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:3996:44: note: candidate: ‘v8::MaybeLocalv8::Object v8::Function::NewInstance(v8::Localv8::Context) const’
V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(
^~~~~~~~~~~
/home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:3996:44: note: candidate expects 1 argument, 2 provided
../src/HID.cc: In static member function ‘static void HID::recvAsyncDone(uv_work_t*)’:
../src/HID.cc:231:32: warning: ‘v8::Localv8::Value Nan::Callback::Call(int, v8::Localv8::Value) const’ is deprecated [-Wdeprecated-declarations]
iocb->_callback->Call(2, argv);
^
In file included from ../src/HID.cc:31:
../../nan/nan.h:1742:3: note: declared here
Call(int argc, v8::Localv8::Value argv[]) const {
^~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::read(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:257:70: warning: cast between incompatible function types from ‘void (
)(uv_work_t*)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), req, recvAsync, (uv_after_work_cb)recvAsyncDone);
^~~~~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::sendFeatureReport(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:363:72: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
message.push_back((unsigned char) messageArray->Get(i)->Int32Value());
^
In file included from /home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:26,
from /home/pi/.cache/node-gyp/10.23.0/include/node/node.h:63,
from ../src/HID.cc:30:
/home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:2478:46: note: declared here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^~~~~~~~~~
/home/pi/.cache/node-gyp/10.23.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::New(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:404:46: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
int32_t vendorId = info[0]->Int32Value();
^
In file included from /home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:26,
from /home/pi/.cache/node-gyp/10.23.0/include/node/node.h:63,
from ../src/HID.cc:30:
/home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:2478:46: note: declared here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^~~~~~~~~~
/home/pi/.cache/node-gyp/10.23.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/HID.cc:405:47: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
int32_t productId = info[1]->Int32Value();
^
In file included from /home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:26,
from /home/pi/.cache/node-gyp/10.23.0/include/node/node.h:63,
from ../src/HID.cc:30:
/home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:2478:46: note: declared here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^~~~~~~~~~
/home/pi/.cache/node-gyp/10.23.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/HID.cc:409:62: warning: ‘v8::String::Value::Value(v8::Localv8::Value)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
serialPointer = (wchar_t*) v8::String::Value(info[2]);
^
In file included from /home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:26,
from /home/pi/.cache/node-gyp/10.23.0/include/node/node.h:63,
from ../src/HID.cc:30:
/home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:2916:51: note: declared here
V8_DEPRECATED("Use Isolate version", explicit Value(Localv8::Value obj));
^~~~~
/home/pi/.cache/node-gyp/10.23.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::setNonBlocking(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:443:37: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
blockStatus = info[0]->Int32Value();
^
In file included from /home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:26,
from /home/pi/.cache/node-gyp/10.23.0/include/node/node.h:63,
from ../src/HID.cc:30:
/home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:2478:46: note: declared here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^~~~~~~~~~
/home/pi/.cache/node-gyp/10.23.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::write(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:471:74: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
message.push_back((unsigned char) messageArray->Get(i)->Int32Value());
^
In file included from /home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:26,
from /home/pi/.cache/node-gyp/10.23.0/include/node/node.h:63,
from ../src/HID.cc:30:
/home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:2478:46: note: declared here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^~~~~~~~~~
/home/pi/.cache/node-gyp/10.23.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::devices(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:535:38: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
vendorId = info[0]->Int32Value();
^
In file included from /home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:26,
from /home/pi/.cache/node-gyp/10.23.0/include/node/node.h:63,
from ../src/HID.cc:30:
/home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:2478:46: note: declared here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^~~~~~~~~~
/home/pi/.cache/node-gyp/10.23.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/HID.cc:536:39: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
productId = info[1]->Int32Value();
^
In file included from /home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:26,
from /home/pi/.cache/node-gyp/10.23.0/include/node/node.h:63,
from ../src/HID.cc:30:
/home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:2478:46: note: declared here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^~~~~~~~~~
/home/pi/.cache/node-gyp/10.23.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
In file included from ../src/HID.cc:30:
../src/HID.cc: At global scope:
/home/pi/.cache/node-gyp/10.23.0/include/node/node.h:573:43: warning: cast between incompatible function types from ‘void (
)(v8::Localv8::Object)’ to ‘node::addon_register_func’ {aka ‘void ()(v8::Localv8::Object, v8::Localv8::Value, void)’} [-Wcast-function-type]
(node::addon_register_func) (regfunc),
^
/home/pi/.cache/node-gyp/10.23.0/include/node/node.h:607:3: note: in expansion of macro ‘NODE_MODULE_X’
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^~~~~~~~~~~~~
../src/HID.cc:629:3: note: in expansion of macro ‘NODE_MODULE’
NODE_MODULE(HID, init);
^~~~~~~~~~~
In file included from /home/pi/.cache/node-gyp/10.23.0/include/node/node.h:63,
from ../src/HID.cc:30:
/home/pi/.cache/node-gyp/10.23.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase::SetWeak(P*, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfonode::ObjectWrap&)]’:
/home/pi/.cache/node-gyp/10.23.0/include/node/node_object_wrap.h:84:78: required from here
/home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfonode::ObjectWrap::Callback’ {aka ‘void (
)(const v8::WeakCallbackInfonode::ObjectWrap&)’} to ‘Callback’ {aka ‘void ()(const v8::WeakCallbackInfo&)’} [-Wcast-function-type]
reinterpret_cast(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/10.23.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase::SetWeak(P
, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfoNan::ObjectWrap&)]’:
../../nan/nan_object_wrap.h:65:61: required from here
/home/pi/.cache/node-gyp/10.23.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfoNan::ObjectWrap::Callback’ {aka ‘void (
)(const v8::WeakCallbackInfoNan::ObjectWrap&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo&)’} [-Wcast-function-type]
make: *** [HID.target.mk:112: Release/obj.target/HID/src/HID.o] Error 1
make: Leaving directory '/home/pi/cncjs-pendant-keyboard/node_modules/node-hid/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:191:23)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.4.72-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/cncjs-pendant-keyboard/node_modules/node-hid
gyp ERR! node -v v10.23.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-hid@0.5.7 install: prebuild-install || node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-hid@0.5.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2021-06-17T02_49_47_619Z-debug.log

@deependdesigns
Copy link
Author

Any suggestions?

@MitchBradley
Copy link
Contributor

The keyboard pendant is unsupported. It has caused problems for a long time.

@jochenderwae
Copy link

@deependdesigns: might be horribly late for you, but try:

npm install node-hid --build-from-source
npm install

@jonmccon
Copy link

Hello! Has anyone made progress on this or another cncjs pendant controller?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants