node-rolling-spider
node-rolling-spider copied to clipboard
Fails to install with Node 10 due to logitech-dual-action-controller
Error Report
When attempting to npm install rolling-spider
with Node 10, the optional logitech-dual-action-controller
dependency causes a failure due to it's reliance on the node-hid
package
https://github.com/voodootikigod/node-rolling-spider/blob/master/package.json#L61-L63 https://github.com/olizilla/node-logitech-dual-action-controller/blob/master/package.json#L16
The logitech-dual-action-controller
package is needed to power the Logitech Dual Action Controller utilized within gamepad.js however this is not critical for connectivity to Parrot Mini Drones. Can this be abstracted to a plugin?
Setup
╰─ node -v v10.14.1 ╰─ npm -v 6.4.1
Error Dump
─ npm install rolling-spider
> [email protected] install /Users/jon/Side/personal/dev-setup/node_modules/node-hid
> node-gyp rebuild
CC(target) Release/obj.target/hidapi/hidapi/mac/hid.o
../hidapi/mac/hid.c:255:20: warning: comparison of integers of different signs: 'CFIndex' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
if (chars_copied == len)
~~~~~~~~~~~~ ^ ~~~
../hidapi/mac/hid.c:295:20: warning: comparison of integers of different signs: 'CFIndex' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
if (used_buf_len == len)
~~~~~~~~~~~~ ^ ~~~
2 warnings generated.
LIBTOOL-STATIC Release/hidapi.a
CXX(target) Release/obj.target/HID/src/HID.o
In file included from ../src/HID.cc:35:
In file included from ../../nan/nan.h:111:
../../nan/nan_new.h:29:56: warning: 'ToInteger' is deprecated [-Wdeprecated-declarations]
To<v8::Integer>(v8::Handle<v8::Integer> i) { return i->ToInteger(); }
^
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:2456:10: note: 'ToInteger' has been explicitly marked deprecated here
inline V8_DEPRECATED("Use maybe version",
^
/Users/jon/.node-gyp/10.14.1/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/HID.cc:35:
In file included from ../../nan/nan.h:111:
../../nan/nan_new.h:34:56: error: no matching member function for call to 'ToInt32'
To<v8::Int32>(v8::Handle<v8::Integer> i) { return i->ToInt32(); }
~~~^~~~~~~
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:2437:43: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<Int32> ToInt32(Local<Context> context) const;
^
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:2450:30: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<Int32> ToInt32(Isolate* isolate) const);
^
In file included from ../src/HID.cc:35:
In file included from ../../nan/nan.h:111:
../../nan/nan_new.h:39:65: error: too few arguments to function call, single argument 'context' was not specified
To<v8::Uint32>(v8::Handle<v8::Integer> i) { return i->ToUint32(); }
~~~~~~~~~~~ ^
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:2435:3: note: 'ToUint32' declared here
V8_WARN_UNUSED_RESULT MaybeLocal<Uint32> ToUint32(
^
/Users/jon/.node-gyp/10.14.1/include/node/v8config.h:416:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
^
In file included from ../src/HID.cc:35:
In file included from ../../nan/nan.h:111:
In file included from ../../nan/nan_new.h:191:
../../nan/nan_implementation_12_inl.h:49:38: error: too few arguments to function call, expected 2, have 1
return v8::BooleanObject::New(value).As<v8::BooleanObject>();
~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:5035:3: note: 'New' declared here
static Local<Value> New(Isolate* isolate, bool value);
^
In file included from ../src/HID.cc:35:
In file included from ../../nan/nan.h:111:
In file included from ../../nan/nan_new.h:191:
../../nan/nan_implementation_12_inl.h:49:60: error: expected '(' for function-style cast or type construction
return v8::BooleanObject::New(value).As<v8::BooleanObject>();
~~~~~~~~~~~~~~~~~^
../../nan/nan_implementation_12_inl.h:49:62: error: expected expression
return v8::BooleanObject::New(value).As<v8::BooleanObject>();
^
../../nan/nan_implementation_12_inl.h:158:22: warning: 'New' is deprecated [-Wdeprecated-declarations]
return v8::RegExp::New(pattern, flags);
^
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:5109:10: note: 'New' has been explicitly marked deprecated here
static V8_DEPRECATED("Use maybe version",
^
/Users/jon/.node-gyp/10.14.1/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/HID.cc:35:
In file included from ../../nan/nan.h:111:
In file included from ../../nan/nan_new.h:191:
../../nan/nan_implementation_12_inl.h:166:10: error: no matching function for call to 'Compile'
return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:1510:51: note: candidate function not viable: no known conversion from 'v8::Isolate *' to 'Local<v8::Context>' for 1st argument
static V8_WARN_UNUSED_RESULT MaybeLocal<Script> Compile(
^
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:1537:51: note: candidate function not viable: requires 4 arguments, but 2 were provided
static V8_WARN_UNUSED_RESULT MaybeLocal<Script> Compile(
^
In file included from ../src/HID.cc:35:
In file included from ../../nan/nan.h:111:
In file included from ../../nan/nan_new.h:191:
../../nan/nan_implementation_12_inl.h:173:10: error: no matching function for call to 'Compile'
return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:1510:51: note: candidate function not viable: no known conversion from 'v8::Isolate *' to 'Local<v8::Context>' for 1st argument
static V8_WARN_UNUSED_RESULT MaybeLocal<Script> Compile(
^
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:1537:51: note: candidate function not viable: requires 4 arguments, but 2 were provided
static V8_WARN_UNUSED_RESULT MaybeLocal<Script> Compile(
^
In file included from ../src/HID.cc:35:
In file included from ../../nan/nan.h:111:
In file included from ../../nan/nan_new.h:191:
../../nan/nan_implementation_12_inl.h:206:9: error: cannot initialize a parameter of type 'v8::NewStringType' with an rvalue of type 'v8::String::NewStringType'
v8::String::kNormalString, length);
^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:2803:64: note: passing argument to parameter 'type' here
Isolate* isolate, const uint8_t* data, v8::NewStringType type,
^
In file included from ../src/HID.cc:35:
In file included from ../../nan/nan.h:111:
In file included from ../../nan/nan_new.h:191:
../../nan/nan_implementation_12_inl.h:217:61: error: cannot initialize a parameter of type 'v8::String::ExternalOneByteStringResource *' with an lvalue of type 'v8::String::ExternalStringResource *'
return v8::String::NewExternal(v8::Isolate::GetCurrent(), value);
^~~~~
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:2862:64: note: passing argument to parameter 'resource' here
ExternalOneByteStringResource* resource));
^
In file included from ../src/HID.cc:35:
In file included from ../../nan/nan.h:111:
In file included from ../../nan/nan_new.h:191:
../../nan/nan_implementation_12_inl.h:229:28: warning: 'New' is deprecated [-Wdeprecated-declarations]
return v8::StringObject::New(value).As<v8::StringObject>();
^
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:5052:3: note: 'New' has been explicitly marked deprecated here
V8_DEPRECATED("Use Isolate* version",
^
/Users/jon/.node-gyp/10.14.1/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/HID.cc:35:
In file included from ../../nan/nan.h:111:
In file included from ../../nan/nan_new.h:191:
../../nan/nan_implementation_12_inl.h:237:30: error: no member named 'CompileUnbound' in 'v8::ScriptCompiler'
return v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src);
~~~~~~~~~~~~~~~~~~~~^
../../nan/nan_implementation_12_inl.h:244:30: error: no member named 'CompileUnbound' in 'v8::ScriptCompiler'
return v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src);
~~~~~~~~~~~~~~~~~~~~^
In file included from ../src/HID.cc:35:
../../nan/nan.h:255:32: warning: 'BooleanValue' is deprecated [-Wdeprecated-declarations]
|| optionsObj->Get(opt)->BooleanValue();
^
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:2474:3: note: 'BooleanValue' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", bool BooleanValue() const);
^
/Users/jon/.node-gyp/10.14.1/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/HID.cc:35:
../../nan/nan.h:259:32: warning: 'BooleanValue' is deprecated [-Wdeprecated-declarations]
&& optionsObj->Get(opt)->BooleanValue();
^
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:2474:3: note: 'BooleanValue' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", bool BooleanValue() const);
^
/Users/jon/.node-gyp/10.14.1/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/HID.cc:35:
../../nan/nan.h:324:27: error: redefinition of 'NanEnsureHandleOrPersistent'
NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) {
^
../../nan/nan.h:319:17: note: previous definition is here
v8::Handle<T> NanEnsureHandleOrPersistent(const v8::Handle<T> &val) {
^
../../nan/nan.h:344:27: error: redefinition of 'NanEnsureLocal'
NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Handle<T> &val) {
^
../../nan/nan.h:334:27: note: previous definition is here
NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Local<T> &val) {
^
../../nan/nan.h:374:39: error: no member named 'IdleNotification' in 'v8::Isolate'
return v8::Isolate::GetCurrent()->IdleNotification(idle_time_in_ms);
~~~~~~~~~~~~~~~~~~~~~~~~~ ^
../../nan/nan.h:560:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
v8::Isolate::GCEpilogueCallback callback
~~~~~~~~~~~~~^
../../nan/nan.h:566:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
v8::Isolate::GCEpilogueCallback callback) {
~~~~~~~~~~~~~^
../../nan/nan.h:571:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
v8::Isolate::GCPrologueCallback callback
~~~~~~~~~~~~~^
../../nan/nan.h:577:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
v8::Isolate::GCPrologueCallback callback) {
~~~~~~~~~~~~~^
../../nan/nan.h:659:15: error: no template named 'WeakCallbackData' in namespace 'v8'
const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) {
~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
5 warnings and 20 errors generated.
make: *** [Release/obj.target/HID/src/HID.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/Cellar/node@10/10.14.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/Cellar/node@10/10.14.1/bin/node" "/usr/local/Cellar/node@10/10.14.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jon/Side/personal/dev-setup/node_modules/node-hid
gyp ERR! node -v v10.14.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
> [email protected] install /Users/jon/Side/personal/dev-setup/node_modules/xpc-connection
> node-gyp rebuild
CXX(target) Release/obj.target/binding/src/XpcConnection.o
../src/XpcConnection.cpp:103:41: warning: 'IntegerValue' is deprecated [-Wdeprecated-declarations]
xpcObject = xpc_int64_create(value->IntegerValue());
^
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:2476:3: note: 'IntegerValue' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
^
/Users/jon/.node-gyp/10.14.1/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/XpcConnection.cpp:113:40: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
Local<Object> valueObject = value->ToObject();
^
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jon/.node-gyp/10.14.1/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/XpcConnection.cpp:123:40: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
Local<Object> valueObject = value->ToObject();
^
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jon/.node-gyp/10.14.1/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/XpcConnection.cpp:143:89: error: too few arguments to function call, expected 2, have 1
Local<Value> propertyValue = object->GetRealNamedProperty(propertyName->ToString());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:3562:3: note: 'GetRealNamedProperty' declared here
V8_WARN_UNUSED_RESULT MaybeLocal<Value> GetRealNamedProperty(
^
/Users/jon/.node-gyp/10.14.1/include/node/v8config.h:416:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
^
../src/XpcConnection.cpp:143:79: warning: 'ToString' is deprecated [-Wdeprecated-declarations]
Local<Value> propertyValue = object->GetRealNamedProperty(propertyName->ToString());
^
/Users/jon/.node-gyp/10.14.1/include/node/v8.h:2454:10: note: 'ToString' has been explicitly marked deprecated here
inline V8_DEPRECATED("Use maybe version", Local<String> ToString() const);
^
/Users/jon/.node-gyp/10.14.1/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/XpcConnection.cpp:254:12: warning: 'MakeCallback' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
../node_modules/nan/nan.h:980:3: note: 'MakeCallback' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
^
../node_modules/nan/nan.h:103:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/XpcConnection.cpp:263:12: warning: 'MakeCallback' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
../node_modules/nan/nan.h:980:3: note: 'MakeCallback' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
^
../node_modules/nan/nan.h:103:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
6 warnings and 1 error generated.
make: *** [Release/obj.target/binding/src/XpcConnection.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/Cellar/node@10/10.14.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/Cellar/node@10/10.14.1/bin/node" "/usr/local/Cellar/node@10/10.14.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jon/Side/personal/dev-setup/node_modules/xpc-connection
gyp ERR! node -v v10.14.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/bluetooth-hci-socket):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux,android,win32","arch":"any"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/node-hid):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/xpc-connection):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ [email protected]
added 10 packages from 12 contributors and audited 116 packages in 11.756s
found 2 low severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
It's worth noting that manually upgrading to the latest version of [email protected] also causes gyp failures in Node 10.
Further tracking: https://github.com/node-hid/node-hid/issues/266
I have opened a pull request with node-logitech-dual-action-controller
to pump the internal version of node-hid
used up to 0.7.6
to support node 10
https://github.com/voodootikigod/node-logitech-dual-action-controller/pull/1