The API for Node 10 has changed, and the existing robot-js bindings do not compile against it correctly. Testing with Node v10.6.0 on Linux, I get this set of errors:
In file included from ../src/NodeImage.h:15:0,
from ../src/NodeImage.cc:14:
../src/NodeImage.cc: In static member function ‘static void ImageWrap::GetPixel(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/NodeCommon.h:68:47: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Local<v8::Value> [4])’
(isolate, JsColor)->NewInstance (4, _jsArgs) \
^
../src/NodeCommon.h:112:54: note: in definition of macro ‘RETURN’
#define RETURN( value ) { args.GetReturnValue().Set (value); return; }
^
../src/NodeCommon.h:125:10: note: in expansion of macro ‘NEW_COLOR’
RETURN (NEW_COLOR (r, g, b, a));
^
../src/NodeImage.cc:112:2: note: in expansion of macro ‘RETURN_COLOR’
RETURN_COLOR (color.R, color.G,
^
../src/NodeCommon.h:68:47: note: candidates are:
(isolate, JsColor)->NewInstance (4, _jsArgs) \
^
../src/NodeCommon.h:112:54: note: in definition of macro ‘RETURN’
#define RETURN( value ) { args.GetReturnValue().Set (value); return; }
^
../src/NodeCommon.h:125:10: note: in expansion of macro ‘NEW_COLOR’
RETURN (NEW_COLOR (r, g, b, a));
^
../src/NodeImage.cc:112:2: note: in expansion of macro ‘RETURN_COLOR’
RETURN_COLOR (color.R, color.G,
^
In file included from /home/travis/.node-gyp/10.6.0/include/node/node.h:63:0,
from /home/travis/.node-gyp/10.6.0/include/node/node_buffer.h:25,
from ../src/NodeCommon.h:16,
from ../src/NodeImage.h:15,
from ../src/NodeImage.cc:14:
/home/travis/.node-gyp/10.6.0/include/node/v8.h:3911:44: note: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^
/home/travis/.node-gyp/10.6.0/include/node/v8.h:3911:44: note: candidate expects 3 arguments, 2 provided
/home/travis/.node-gyp/10.6.0/include/node/v8.h:3914:44: note: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^
/home/travis/.node-gyp/10.6.0/include/node/v8.h:3914:44: note: candidate expects 1 argument, 2 provided
../src/NodeImage.cc: In static member function ‘static void ImageWrap::New(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/NodeImage.cc:206:37: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Local<v8::Value> [4])’
_jsArgs[1] = args[1], _jsArgs));
^
../src/NodeImage.cc:206:37: note: candidates are:
In file included from /home/travis/.node-gyp/10.6.0/include/node/node.h:63:0,
from /home/travis/.node-gyp/10.6.0/include/node/node_buffer.h:25,
from ../src/NodeCommon.h:16,
from ../src/NodeImage.h:15,
from ../src/NodeImage.cc:14:
/home/travis/.node-gyp/10.6.0/include/node/v8.h:3911:44: note: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^
/home/travis/.node-gyp/10.6.0/include/node/v8.h:3911:44: note: candidate expects 3 arguments, 2 provided
/home/travis/.node-gyp/10.6.0/include/node/v8.h:3914:44: note: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^
/home/travis/.node-gyp/10.6.0/include/node/v8.h:3914:44: note: candidate expects 1 argument, 2 provided
In file included from ../src/NodeImage.h:15:0,
from ../src/NodeImage.cc:14:
../src/NodeImage.cc:223:35: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Local<v8::Value> [4])’
_jsArgs[1] = args[1], _jsArgs)));
^
../src/NodeCommon.h:112:54: note: in definition of macro ‘RETURN’
#define RETURN( value ) { args.GetReturnValue().Set (value); return; }
^
../src/NodeImage.cc:223:35: note: candidates are:
_jsArgs[1] = args[1], _jsArgs)));
^
../src/NodeCommon.h:112:54: note: in definition of macro ‘RETURN’
#define RETURN( value ) { args.GetReturnValue().Set (value); return; }
^
In file included from /home/travis/.node-gyp/10.6.0/include/node/node.h:63:0,
from /home/travis/.node-gyp/10.6.0/include/node/node_buffer.h:25,
from ../src/NodeCommon.h:16,
from ../src/NodeImage.h:15,
from ../src/NodeImage.cc:14:
/home/travis/.node-gyp/10.6.0/include/node/v8.h:3911:44: note: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^
/home/travis/.node-gyp/10.6.0/include/node/v8.h:3911:44: note: candidate expects 3 arguments, 2 provided
/home/travis/.node-gyp/10.6.0/include/node/v8.h:3914:44: note: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^
/home/travis/.node-gyp/10.6.0/include/node/v8.h:3914:44: note: candidate expects 1 argument, 2 provided
In the long-term, I'm sure we will want to rework this module to use NAN or N-API, but in the short-term, I wonder if there is a way to adjust the macros so as to support ABI 64...