ok, got this now when I copied from the documentation on the serial-module;
pi@Hallon:~/.node-red $ npm i node-red-node-serialport
> serialport@6.2.2 install /home/pi/.node-red/node_modules/serialport
> prebuild-install || node-gyp rebuild
prebuild-install WARN install No prebuilt binaries found (target=12.18.2 runtime=node arch=arm platform=linux)
make: GĂ„r till katalogen â/home/pi/.node-red/node_modules/serialport/buildâ
CXX(target) Release/obj.target/serialport/src/serialport.o
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../../nan/nan.h: In function âvoid Nan::AsyncQueueWorker(Nan::AsyncWorker*)â:
../../nan/nan.h:2294:62: 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]
, reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
^
../src/serialport.cpp: In function âNan::NAN_METHOD_RETURN_TYPE Open(Nan::NAN_METHOD_ARGS_TYPE)â:
../src/serialport.cpp:41:48: error: no matching function for call to âv8::Value::ToString()â
v8::String::Utf8Value path(info[0]->ToString());
^
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
from ../../nan/nan.h:56,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2668:44: note: candidate: âv8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) constâ
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2668:44: note: candidate expects 1 argument, 0 provided
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/v8-internal.h:14,
from /home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:27,
from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
from ../../nan/nan.h:56,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2684:31: note: candidate: âv8::Local<v8::String> v8::Value::ToString(v8::Isolate*) constâ
Local<String> ToString(Isolate* isolate) const);
^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro âV8_DEPRECATEDâ
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2684:31: note: candidate expects 1 argument, 0 provided
Local<String> ToString(Isolate* isolate) const);
^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro âV8_DEPRECATEDâ
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
../src/serialport.cpp:48:53: error: no matching function for call to âv8::Value::ToObject()â
v8::Local<v8::Object> options = info[1]->ToObject();
^
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
from ../../nan/nan.h:56,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2672:44: note: candidate: âv8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) constâ
V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2672:44: note: candidate expects 1 argument, 0 provided
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/v8-internal.h:14,
from /home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:27,
from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
from ../../nan/nan.h:56,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2686:31: note: candidate: âv8::Local<v8::Object> v8::Value::ToObject(v8::Isolate*) constâ
Local<Object> ToObject(Isolate* isolate) const);
^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro âV8_DEPRECATEDâ
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2686:31: note: candidate expects 1 argument, 0 provided
Local<Object> ToObject(Isolate* isolate) const);
^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro âV8_DEPRECATEDâ
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
../src/serialport.cpp:78:69: 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, EIO_Open, (uv_after_work_cb)EIO_AfterOpen);
^~~~~~~~~~~~~
../src/serialport.cpp: In function âvoid EIO_AfterOpen(uv_work_t*)â:
../src/serialport.cpp:95:30: warning: âv8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) constâ is deprecated [-Wdeprecated-declarations]
data->callback.Call(2, argv);
^
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../../nan/nan.h:1742:3: note: declared here
Call(int argc, v8::Local<v8::Value> argv[]) const {
^~~~
../src/serialport.cpp: In function âNan::NAN_METHOD_RETURN_TYPE Update(Nan::NAN_METHOD_ARGS_TYPE)â:
../src/serialport.cpp:113:53: error: no matching function for call to âv8::Value::ToObject()â
v8::Local<v8::Object> options = info[1]->ToObject();
^
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
from ../../nan/nan.h:56,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2672:44: note: candidate: âv8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) constâ
V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2672:44: note: candidate expects 1 argument, 0 provided
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/v8-internal.h:14,
from /home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:27,
from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
from ../../nan/nan.h:56,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2686:31: note: candidate: âv8::Local<v8::Object> v8::Value::ToObject(v8::Isolate*) constâ
Local<Object> ToObject(Isolate* isolate) const);
^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro âV8_DEPRECATEDâ
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2686:31: note: candidate expects 1 argument, 0 provided
Local<Object> ToObject(Isolate* isolate) const);
^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro âV8_DEPRECATEDâ
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
../src/serialport.cpp:135:71: 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, EIO_Update, (uv_after_work_cb)EIO_AfterUpdate);
^~~~~~~~~~~~~~~
../src/serialport.cpp: In function âvoid EIO_AfterUpdate(uv_work_t*)â:
../src/serialport.cpp:150:30: warning: âv8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) constâ is deprecated [-Wdeprecated-declarations]
data->callback.Call(1, argv);
^
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../../nan/nan.h:1742:3: note: declared here
Call(int argc, v8::Local<v8::Value> argv[]) const {
^~~~
../src/serialport.cpp: In function âNan::NAN_METHOD_RETURN_TYPE Close(Nan::NAN_METHOD_ARGS_TYPE)â:
../src/serialport.cpp:175: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, EIO_Close, (uv_after_work_cb)EIO_AfterClose);
^~~~~~~~~~~~~~
../src/serialport.cpp: In function âvoid EIO_AfterClose(uv_work_t*)â:
../src/serialport.cpp:188:30: warning: âv8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) constâ is deprecated [-Wdeprecated-declarations]
data->callback.Call(1, argv);
^
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../../nan/nan.h:1742:3: note: declared here
Call(int argc, v8::Local<v8::Value> argv[]) const {
^~~~
../src/serialport.cpp: In function âNan::NAN_METHOD_RETURN_TYPE Flush(Nan::NAN_METHOD_ARGS_TYPE)â:
../src/serialport.cpp:215: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, EIO_Flush, (uv_after_work_cb)EIO_AfterFlush);
^~~~~~~~~~~~~~
../src/serialport.cpp: In function âvoid EIO_AfterFlush(uv_work_t*)â:
../src/serialport.cpp:231:30: warning: âv8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) constâ is deprecated [-Wdeprecated-declarations]
data->callback.Call(1, argv);
^
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../../nan/nan.h:1742:3: note: declared here
Call(int argc, v8::Local<v8::Value> argv[]) const {
^~~~
../src/serialport.cpp: In function âNan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)â:
../src/serialport.cpp:250:53: error: no matching function for call to âv8::Value::ToObject()â
v8::Local<v8::Object> options = info[1]->ToObject();
^
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
from ../../nan/nan.h:56,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2672:44: note: candidate: âv8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) constâ
V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2672:44: note: candidate expects 1 argument, 0 provided
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/v8-internal.h:14,
from /home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:27,
from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
from ../../nan/nan.h:56,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2686:31: note: candidate: âv8::Local<v8::Object> v8::Value::ToObject(v8::Isolate*) constâ
Local<Object> ToObject(Isolate* isolate) const);
^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro âV8_DEPRECATEDâ
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2686:31: note: candidate expects 1 argument, 0 provided
Local<Object> ToObject(Isolate* isolate) const);
^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro âV8_DEPRECATEDâ
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
../src/serialport.cpp:270:68: 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, EIO_Set, (uv_after_work_cb)EIO_AfterSet);
^~~~~~~~~~~~
../src/serialport.cpp: In function âvoid EIO_AfterSet(uv_work_t*)â:
../src/serialport.cpp:285:30: warning: âv8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) constâ is deprecated [-Wdeprecated-declarations]
data->callback.Call(1, argv);
^
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../../nan/nan.h:1742:3: note: declared here
Call(int argc, v8::Local<v8::Value> argv[]) const {
^~~~
../src/serialport.cpp: In function âNan::NAN_METHOD_RETURN_TYPE Get(Nan::NAN_METHOD_ARGS_TYPE)â:
../src/serialport.cpp:314:68: 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, EIO_Get, (uv_after_work_cb)EIO_AfterGet);
^~~~~~~~~~~~
../src/serialport.cpp: In function âvoid EIO_AfterGet(uv_work_t*)â:
../src/serialport.cpp:329:96: warning: âbool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)â is deprecated: Use maybe version [-Wdeprecated-declarations]
results->Set(Nan::New<v8::String>("cts").ToLocalChecked(), Nan::New<v8::Boolean>(data->cts));
^
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/v8-internal.h:14,
from /home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:27,
from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
from ../../nan/nan.h:56,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:3499:22: note: declared here
bool Set(Local<Value> key, Local<Value> value));
^~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro âV8_DEPRECATEDâ
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
../src/serialport.cpp:330:96: warning: âbool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)â is deprecated: Use maybe version [-Wdeprecated-declarations]
results->Set(Nan::New<v8::String>("dsr").ToLocalChecked(), Nan::New<v8::Boolean>(data->dsr));
^
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/v8-internal.h:14,
from /home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:27,
from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
from ../../nan/nan.h:56,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:3499:22: note: declared here
bool Set(Local<Value> key, Local<Value> value));
^~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro âV8_DEPRECATEDâ
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
../src/serialport.cpp:331:96: warning: âbool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)â is deprecated: Use maybe version [-Wdeprecated-declarations]
results->Set(Nan::New<v8::String>("dcd").ToLocalChecked(), Nan::New<v8::Boolean>(data->dcd));
^
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/v8-internal.h:14,
from /home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:27,
from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
from ../../nan/nan.h:56,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:3499:22: note: declared here
bool Set(Local<Value> key, Local<Value> value));
^~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro âV8_DEPRECATEDâ
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
../src/serialport.cpp:336:30: warning: âv8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) constâ is deprecated [-Wdeprecated-declarations]
data->callback.Call(2, argv);
^
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../../nan/nan.h:1742:3: note: declared here
Call(int argc, v8::Local<v8::Value> argv[]) const {
^~~~
../src/serialport.cpp: In function âNan::NAN_METHOD_RETURN_TYPE GetBaudRate(Nan::NAN_METHOD_ARGS_TYPE)â:
../src/serialport.cpp:363:76: 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, EIO_GetBaudRate, (uv_after_work_cb)EIO_AfterGetBaudRate);
^~~~~~~~~~~~~~~~~~~~
../src/serialport.cpp: In function âvoid EIO_AfterGetBaudRate(uv_work_t*)â:
../src/serialport.cpp:378:106: warning: âbool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)â is deprecated: Use maybe version [-Wdeprecated-declarations]
results->Set(Nan::New<v8::String>("baudRate").ToLocalChecked(), Nan::New<v8::Integer>(data->baudRate));
^
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/v8-internal.h:14,
from /home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:27,
from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
from ../../nan/nan.h:56,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:3499:22: note: declared here
bool Set(Local<Value> key, Local<Value> value));
^~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro âV8_DEPRECATEDâ
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
../src/serialport.cpp:383:30: warning: âv8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) constâ is deprecated [-Wdeprecated-declarations]
data->callback.Call(2, argv);
^
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../../nan/nan.h:1742:3: note: declared here
Call(int argc, v8::Local<v8::Value> argv[]) const {
^~~~
../src/serialport.cpp: In function âNan::NAN_METHOD_RETURN_TYPE Drain(Nan::NAN_METHOD_ARGS_TYPE)â:
../src/serialport.cpp:409: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, EIO_Drain, (uv_after_work_cb)EIO_AfterDrain);
^~~~~~~~~~~~~~
../src/serialport.cpp: In function âvoid EIO_AfterDrain(uv_work_t*)â:
../src/serialport.cpp:424:30: warning: âv8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) constâ is deprecated [-Wdeprecated-declarations]
data->callback.Call(1, argv);
^
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../../nan/nan.h:1742:3: note: declared here
Call(int argc, v8::Local<v8::Value> argv[]) const {
^~~~
../src/serialport.cpp: At global scope:
../src/serialport.cpp:430:28: warning: unnecessary parentheses in declaration of âToParityEnumâ [-Wparentheses]
SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) {
^
../src/serialport.cpp:449:30: warning: unnecessary parentheses in declaration of âToStopBitEnumâ [-Wparentheses]
SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) {
^
../src/serialport.cpp:460:17: error: variable or field âinitâ declared void
void init(v8::Handle<v8::Object> target) {
^~~~~~
../src/serialport.cpp:460:17: error: âHandleâ is not a member of âv8â
../src/serialport.cpp:460:34: error: expected primary-expression before â>â token
void init(v8::Handle<v8::Object> target) {
^
../src/serialport.cpp:460:36: error: âtargetâ was not declared in this scope
void init(v8::Handle<v8::Object> target) {
^~~~~~
../src/serialport.cpp:460:36: note: suggested alternative: âtzsetâ
void init(v8::Handle<v8::Object> target) {
^~~~~~
tzset
In file included from ../../nan/nan.h:56,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../src/serialport.cpp:485:25: error: âinitâ was not declared in this scope
NODE_MODULE(serialport, init);
^~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/node.h:608:36: note: in definition of macro âNODE_MODULE_Xâ
(node::addon_register_func) (regfunc), \
^~~~~~~
../src/serialport.cpp:485:1: note: in expansion of macro âNODE_MODULEâ
NODE_MODULE(serialport, init);
^~~~~~~~~~~
../src/serialport.cpp:485:25: note: suggested alternative: âintâ
NODE_MODULE(serialport, init);
^~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/node.h:608:36: note: in definition of macro âNODE_MODULE_Xâ
(node::addon_register_func) (regfunc), \
^~~~~~~
../src/serialport.cpp:485:1: note: in expansion of macro âNODE_MODULEâ
NODE_MODULE(serialport, init);
^~~~~~~~~~~
make: *** [serialport.target.mk:112: Release/obj.target/serialport/src/serialport.o] Fel 1
make: LĂ€mnar katalogen â/home/pi/.node-red/node_modules/serialport/buildâ
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.118-v7l+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/.node-red/node_modules/serialport
gyp ERR! node -v v12.18.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN node-red-node-ui-list@0.2.5 requires a peer of node-red-dashboard@>2.15.0 but none is installed. You must install peer dependencies yourself.
npm WARN node-red-node-ui-table@0.3.0 requires a peer of node-red-dashboard@>2.15.0 but none is installed. You must install peer dependencies yourself.
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! serialport@6.2.2 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@6.2.2 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/2020-07-22T18_39_47_872Z-debug.log