npm install serialport --build-from-source
output:
> [email protected] install /data/data/com.termux/files/home/mhb-js/node_modules/zigbee-service/node_modules/serialport
> prebuild-install || node-gyp rebuild
make: Entering directory '/data/data/com.termux/files/home/mhb-js/node_modules/zigbee-service/node_modules/serialport/build'
CXX(target) Release/obj.target/serialport/src/serialport.o
../src/serialport.cpp:41:39: error: no matching member function for call to 'ToString'
v8::String::Utf8Value path(info[0]->ToString());
~~~~~~~~~^~~~~~~~
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:2528:44: note: candidate function not viable: requires single argument 'context',
but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:2544:35: note: candidate function not viable: requires single argument 'isolate',
but no arguments were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/serialport.cpp:48:44: error: no matching member function for call to 'ToObject'
v8::Local<v8::Object> options = info[1]->ToObject();
~~~~~~~~~^~~~~~~~
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:2532:44: note: candidate function not viable: requires single argument 'context',
but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:2546:35: note: candidate function not viable: requires single argument 'isolate',
but no arguments were provided
Local<Object> ToObject(Isolate* isolate) const);
^
../src/serialport.cpp:95:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
data->callback.Call(2, argv);
^
../../../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/serialport.cpp:113:44: error: no matching member function for call to 'ToObject'
v8::Local<v8::Object> options = info[1]->ToObject();
~~~~~~~~~^~~~~~~~
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:2532:44: note: candidate function not viable: requires single argument 'context',
but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:2546:35: note: candidate function not viable: requires single argument 'isolate',
but no arguments were provided
Local<Object> ToObject(Isolate* isolate) const);
^
../src/serialport.cpp:150:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
data->callback.Call(1, argv);
^
../../../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/serialport.cpp:188:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
data->callback.Call(1, argv);
^
../../../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/serialport.cpp:231:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
data->callback.Call(1, argv);
^
../../../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/serialport.cpp:250:44: error: no matching member function for call to 'ToObject'
v8::Local<v8::Object> options = info[1]->ToObject();
~~~~~~~~~^~~~~~~~
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:2532:44: note: candidate function not viable: requires single argument 'context',
but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:2546:35: note: candidate function not viable: requires single argument 'isolate',
but no arguments were provided
Local<Object> ToObject(Isolate* isolate) const);
^
../src/serialport.cpp:285:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
data->callback.Call(1, argv);
^
../../../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/serialport.cpp:329:14: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
results->Set(Nan::New<v8::String>("cts").ToLocalChecked(), Nan::New<v8::Boolean>(data->cts));
^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
../src/serialport.cpp:330:14: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
results->Set(Nan::New<v8::String>("dsr").ToLocalChecked(), Nan::New<v8::Boolean>(data->dsr));
^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
../src/serialport.cpp:331:14: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
results->Set(Nan::New<v8::String>("dcd").ToLocalChecked(), Nan::New<v8::Boolean>(data->dcd));
^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
../src/serialport.cpp:336:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
data->callback.Call(2, argv);
^
../../../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/serialport.cpp:378:14: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
results->Set(Nan::New<v8::String>("baudRate").ToLocalChecked(), Nan::New<v8::Integer>(data->baudRate));
^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
../src/serialport.cpp:383:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
data->callback.Call(2, argv);
^
../../../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/serialport.cpp:424:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
data->callback.Call(1, argv);
^
../../../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/serialport.cpp:460:8: error: variable has incomplete type 'void'
void init(v8::Handle<v8::Object> target) {
^
../src/serialport.cpp:460:34: error: expected '(' for function-style cast or type construction
void init(v8::Handle<v8::Object> target) {
~~~~~~~~~~^
../src/serialport.cpp:460:17: error: no member named 'Handle' in namespace 'v8'
void init(v8::Handle<v8::Object> target) {
~~~~^
../src/serialport.cpp:460:36: error: use of undeclared identifier 'target'
void init(v8::Handle<v8::Object> target) {
^
../src/serialport.cpp:460:43: error: expected ';' after top level declarator
void init(v8::Handle<v8::Object> target) {
^
;
12 warnings and 9 errors generated.
make: *** [serialport.target.mk:107: Release/obj.target/serialport/src/serialport.o] Error 1
make: Leaving directory '/data/data/com.termux/files/home/mhb-js/node_modules/zigbee-service/node_modules/serialport/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:200:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.19.27-primeos
gyp ERR! command "/data/data/com.termux/files/usr/bin/node" "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /data/data/com.termux/files/home/mhb-js/node_modules/zigbee-service/node_modules/serialport
gyp ERR! node -v v12.4.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] requires a peer of axios@* but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! /data/data/com.termux/files/home/.npm/_logs/2019-07-31T19_52_06_346Z-debug.log
(I installed python2 and build-essential)
Having the same issue on MacOS 10.14.6. Any ideas?
[email protected]
Node.js v12.7.0
3.1 Ghz Intel Core i7
@foxxyz @apiel Can you try using an older version of Node.js to compile serialport? v10.16.2 is the latest LTS version. Node.js v12 has some breaking changes for native dependencies that we're still working through.
Thanks @HipsterBrown! Good to know.
Just tried with Node v10.16.2 (MacOS 10.14.6) and [email protected] compiles fine.
Is there any issue or board that we can track for the ongoing status on Nodev12 support?
@foxxyz Are you able to use the latest version of serialport? That compiles against Node v12 successfully.
I would, but this is occurring via a dependency in dmx which is still pinned to 6.0.4.
I will open an issue with them to update also.
Most helpful comment
Thanks @HipsterBrown! Good to know.
Just tried with Node v10.16.2 (MacOS 10.14.6) and [email protected] compiles fine.
Is there any issue or board that we can track for the ongoing status on Nodev12 support?