Error on docker build

Hi All,
I have a problem with running node-red-node-serialport what is using node_serialport on a rpi based device.

On building the docker img i get errors like:

[34m[main]e[39m  Step 7/9 : RUN apk add --no-cache make gcc g++ python &&   JOBS=MAX npm install -g node-red-node-serialport --production --silent --unsafe-perm &&   JOBS=MAX npm install -g node-red-contrib-modbus --production --silent --unsafe-perm &&   apk del make gcc g++ python &&   npm cache clean --force && rm -rf /tmp/*
e[34m[main]e[39m   ---> Running in 727dbe264537
e[34m[main]e[39m  fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/armhf/APKINDEX.tar.gz
e[34m[main]e[39m  fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/armhf/APKINDEX.tar.gz
e[34m[main]e[39m  (1/13) Installing binutils (2.30-r5)
e[34m[main]e[39m  (2/13) Installing isl (0.18-r0)
e[34m[main]e[39m  (3/13) Installing libgomp (6.4.0-r8)
e[34m[main]e[39m  (4/13) Installing libatomic (6.4.0-r8)
e[34m[main]e[39m  (5/13) Installing mpfr3 (3.1.5-r1)
e[34m[main]e[39m  (6/13) Installing mpc1 (1.0.3-r1)
e[34m[main]e[39m  (7/13) Installing gcc (6.4.0-r8)
e[34m[main]e[39m  (8/13) Installing musl-dev (1.1.19-r10)
e[34m[main]e[39m  (9/13) Installing libc-dev (0.7.1-r0)
e[34m[main]e[39m  (10/13) Installing g++ (6.4.0-r8)
e[34m[main]e[39m  (11/13) Installing make (4.2.1-r2)
e[34m[main]e[39m  (12/13) Installing gdbm (1.13-r1)
e[34m[main]e[39m  (13/13) Installing python2 (2.7.15-r0)
e[34m[main]e[39m  Executing busybox-1.28.4-r0.trigger
e[34m[main]e[39m  OK: 205 MiB in 83 packages
e[34m[main]e[39m  make: Entering directory '/usr/local/lib/node_modules/node-red-node-serialport/node_modules/serialport/build'
e[34m[main]e[39m    CXX(target) Release/obj.target/serialport/src/serialport.o
e[34m[main]e[39m    CXX(target) Release/obj.target/serialport/src/serialport_unix.o
e[34m[main]e[39m    CXX(target) Release/obj.target/serialport/src/poller.o
e[34m[main]e[39m    CXX(target) Release/obj.target/serialport/src/serialport_linux.o
e[34m[main]e[39m  e[91m../src/serialport_linux.cpp:4:24: fatal error: asm/ioctls.h: No such file or directory
e[34m[main]e[39m   #include <asm/ioctls.h>
e[34m[main]e[39m                          ^
e[34m[main]e[39m  compilation terminated.
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91mmake: *** [serialport.target.mk:96: Release/obj.target/serialport/src/serialport_linux.o] Error 1
e[34m[main]e[39m  make: *** Waiting for unfinished jobs....
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport_unix.cpp:24:26: fatal error: linux/serial.h: No such file or directory
e[34m[main]e[39m   #include <linux/serial.h>
e[34m[main]e[39m                            ^
e[34m[main]e[39m  compilation terminated.
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91mmake: *** [serialport.target.mk:96: Release/obj.target/serialport/src/serialport_unix.o] Error 1
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterOpen(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:95:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(2, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../../nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterUpdate(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:150:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(1, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../../nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/poller.cpp: In static member function 'static void Poller::onData(uv_poll_t*, int, int)':
e[34m[main]e[39m  ../src/poller.cpp:69:29: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     obj->callback.Call(2, argv);
e[34m[main]e[39m                               ^
e[34m[main]e[39m  In file included from ../src/poller.cpp:1:0:
e[34m[main]e[39m  ../../nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterClose(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:188:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(1, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../../nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterFlush(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:231:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(1, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../../nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterSet(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:285:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(1, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../../nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterGet(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:336:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(2, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../../nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterGetBaudRate(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:383:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(2, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../../nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterDrain(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:424:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(1, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../../nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  make: Leaving directory '/usr/local/lib/node_modules/node-red-node-serialport/node_modules/serialport/build'
e[34m[main]e[39m  Removing intermediate container 727dbe264537
e[34m[main]e[39m  e[31mThe command '/bin/sh -c apk add --no-cache make gcc g++ python &&   JOBS=MAX npm install -g node-red-node-serialport --production --silent --unsafe-perm &&   JOBS=MAX npm install -g node-red-contrib-modbus --production --silent --unsafe-perm &&   apk del make gcc g++ python &&   npm cache clean --force && rm -rf /tmp/*' returned a non-zero code: 1e[39m
e[36m[Info]e[39m  Uploading images
[================>                                  ] 33%e[2Ke[Ge[32m[Success]e[39m  Successfully uploaded images
e[31m[Error]e[39m  Some services failed to build:
e[31m[Error]e[39m    Service: main
e[31m[Error]e[39m      Error: The command '/bin/sh -c apk add --no-cache make gcc g++ python &&   JOBS=MAX npm install -g node-red-node-serialport --production --silent --unsafe-perm &&   JOBS=MAX npm install -g node-red-contrib-modbus --production --silent --unsafe-perm &&   apk del make gcc g++ python &&   npm cache clean --force && rm -rf /tmp/*' returned a non-zero code: 1
e[31m[Error]e[39m  Not deploying release.

I am using base img:
FROM resin/%%RESIN_MACHINE_NAME%%-alpine-node:9-slim

Is that running an old Nodejs version maybe? Does anyone know how to check this or how i can try to update the nodejs version?

Just tried a new build with:

FROM resin/%%RESIN_MACHINE_NAME%%-alpine-node:0.10.48-slim

but with the same results:

[34m[main]e[39m  Step 1/9 : FROM resin/raspberrypi3-alpine-node:0.10.48-slim
e[34m[main]e[39m   ---> 46a9c2b36740
e[34m[main]e[39m  Step 2/9 : RUN mkdir -p /usr/src/app/
e[34m[main]e[39m   ---> Running in fb26500e3558
e[34m[main]e[39m   ---> ceb6eceab279
e[34m[main]e[39m  Removing intermediate container fb26500e3558
e[34m[main]e[39m  Step 3/9 : WORKDIR /usr/src/app
e[34m[main]e[39m   ---> 2a0412617ae2
e[34m[main]e[39m  Removing intermediate container fe8976e19575
e[34m[main]e[39m  Step 4/9 : COPY ./app ./
e[34m[main]e[39m   ---> 3de0661066b8
e[34m[main]e[39m  Removing intermediate container be9cde7470b2
e[34m[main]e[39m  Step 5/9 : COPY entry.sh /usr/bin/entry.sh
e[34m[main]e[39m   ---> 4e53fa4dbf33
e[34m[main]e[39m  Removing intermediate container ae3d549d9826
e[34m[main]e[39m  Step 6/9 : COPY udev-rules/ /etc/udev/rules.d/
e[34m[main]e[39m   ---> 6f40895ec386
e[34m[main]e[39m  Removing intermediate container ba14080f9d1a
e[34m[main]e[39m  Step 7/9 : RUN apk add --no-cache make gcc g++ python &&   JOBS=MAX npm install -g node-red-node-serialport --production --silent &&   JOBS=MAX npm install -g node-red-contrib-modbus --production --silent &&   apk del make gcc g++ python &&   npm cache clean --force && rm -rf /tmp/*
e[34m[main]e[39m   ---> Running in 47854f1ebb21
e[34m[main]e[39m  fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/armhf/APKINDEX.tar.gz
e[34m[main]e[39m  fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/armhf/APKINDEX.tar.gz
e[34m[main]e[39m  (1/13) Installing binutils (2.30-r5)
e[34m[main]e[39m  (2/13) Installing isl (0.18-r0)
e[34m[main]e[39m  (3/13) Installing libgomp (6.4.0-r8)
e[34m[main]e[39m  (4/13) Installing libatomic (6.4.0-r8)
e[34m[main]e[39m  (5/13) Installing mpfr3 (3.1.5-r1)
e[34m[main]e[39m  (6/13) Installing mpc1 (1.0.3-r1)
e[34m[main]e[39m  (7/13) Installing gcc (6.4.0-r8)
e[34m[main]e[39m  (8/13) Installing musl-dev (1.1.19-r10)
e[34m[main]e[39m  (9/13) Installing libc-dev (0.7.1-r0)
e[34m[main]e[39m  (10/13) Installing g++ (6.4.0-r8)
e[34m[main]e[39m  (11/13) Installing make (4.2.1-r2)
e[34m[main]e[39m  (12/13) Installing gdbm (1.13-r1)
e[34m[main]e[39m  (13/13) Installing python2 (2.7.15-r0)
e[34m[main]e[39m  Executing busybox-1.28.4-r0.trigger
e[34m[main]e[39m  OK: 205 MiB in 83 packages
e[34m[main]e[39m  e[91m
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m/usr/local/lib/node_modules/node-red-node-serialport/node_modules/serialport/node_modules/prebuild-install/node_modules/which-pm-runs/index.js:11
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m  const pmSpec = userAgent.split(' ')[0]
e[34m[main]e[39m    ^^^^^
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91mSyntaxError: Use of const in strict mode.
e[34m[main]e[39m      at Module._compile (module.js:439:25)
e[34m[main]e[39m      at Object.Module._extensions..js (module.js:474:10)
e[34m[main]e[39m      at Module.load (module.js:356:32)
e[34m[main]e[39m      at Function.Module._load (module.js:312:12)
e[34m[main]e[39m      at Module.require (module.js:364:17)
e[34m[main]e[39m      at require (module.js:380:17)
e[34m[main]e[39m      at Object.<anonymous> (/usr/local/lib/node_modules/node-red-node-serialport/node_modules/serialport/node_modules/prebuild-install/bin.js:5:19)
e[34m[main]e[39m      at Module._compile (module.js:456:26)
e[34m[main]e[39m      at Object.Module._extensions..js (module.js:474:10)
e[34m[main]e[39m      at Module.load (module.js:356:32)
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  make: Entering directory '/usr/local/lib/node_modules/node-red-node-serialport/node_modules/serialport/build'
e[34m[main]e[39m    CXX(target) Release/obj.target/serialport/src/serialport.o
e[34m[main]e[39m    CXX(target) Release/obj.target/serialport/src/serialport_unix.o
e[34m[main]e[39m    CXX(target) Release/obj.target/serialport/src/poller.o
e[34m[main]e[39m    CXX(target) Release/obj.target/serialport/src/serialport_linux.o
e[34m[main]e[39m  e[91m../src/serialport_linux.cpp:4:24: fatal error: asm/ioctls.h: No such file or directory
e[34m[main]e[39m   #include <asm/ioctls.h>
e[34m[main]e[39m                          ^
e[34m[main]e[39m  compilation terminated.
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91mmake: *** [serialport.target.mk:91: Release/obj.target/serialport/src/serialport_linux.o] Error 1
e[34m[main]e[39m  make: *** Waiting for unfinished jobs....
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport_unix.cpp:24:26: fatal error: linux/serial.h: No such file or directory
e[34m[main]e[39m   #include <linux/serial.h>
e[34m[main]e[39m                            ^
e[34m[main]e[39m  compilation terminated.
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91mmake: *** [serialport.target.mk:91: Release/obj.target/serialport/src/serialport_unix.o] Error 1
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/poller.cpp: In constructor 'Poller::Poller(int)':
e[34m[main]e[39m  ../src/poller.cpp:12:39: error: could not convert 'status' from 'int' to 'uv_err_t {aka uv_err_s}'
e[34m[main]e[39m       Nan::ThrowError(uv_strerror(status));
e[34m[main]e[39m                                         ^
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/poller.cpp: In member function 'void Poller::poll(int)':
e[34m[main]e[39m  ../src/poller.cpp:39:43: error: could not convert 'status' from 'int' to 'uv_err_t {aka uv_err_s}'
e[34m[main]e[39m       Nan::ThrowTypeError(uv_strerror(status));
e[34m[main]e[39m                                             ^
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/poller.cpp: In member function 'void Poller::stop()':
e[34m[main]e[39m  ../src/poller.cpp:47:43: error: could not convert 'status' from 'int' to 'uv_err_t {aka uv_err_s}'
e[34m[main]e[39m       Nan::ThrowTypeError(uv_strerror(status));
e[34m[main]e[39m                                             ^
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/poller.cpp: In static member function 'static void Poller::onData(uv_poll_t*, int, int)':
e[34m[main]e[39m  ../src/poller.cpp:58:75: error: could not convert 'status' from 'int' to 'uv_err_t {aka uv_err_s}'
e[34m[main]e[39m       argv[0] = v8::Exception::Error(Nan::New<v8::String>(uv_strerror(status)).ToLocalChecked());
e[34m[main]e[39m                                                                             ^
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/poller.cpp:69:29: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     obj->callback.Call(2, argv);
e[34m[main]e[39m                               ^
e[34m[main]e[39m  In file included from ../src/poller.cpp:1:0:
e[34m[main]e[39m  ../node_modules/nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterOpen(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:95:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(2, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../node_modules/nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterUpdate(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:150:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(1, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../node_modules/nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterClose(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:188:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(1, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../node_modules/nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterFlush(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:231:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(1, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../node_modules/nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterSet(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:285:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(1, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../node_modules/nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterGet(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:336:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(2, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../node_modules/nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterGetBaudRate(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:383:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(2, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../node_modules/nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterDrain(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:424:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(1, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../node_modules/nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91mmake: *** [serialport.target.mk:91: Release/obj.target/serialport/src/poller.o] Error 1
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  make: Leaving directory '/usr/local/lib/node_modules/node-red-node-serialport/node_modules/serialport/build'
e[34m[main]e[39m  Removing intermediate container 47854f1ebb21
e[34m[main]e[39m  e[31mThe command '/bin/sh -c apk add --no-cache make gcc g++ python &&   JOBS=MAX npm install -g node-red-node-serialport --production --silent &&   JOBS=MAX npm install -g node-red-contrib-modbus --production --silent &&   apk del make gcc g++ python &&   npm cache clean --force && rm -rf /tmp/*' returned a non-zero code: 1e[39m
e[36m[Info]e[39m  Uploading images
[================>                                  ] 33%e[2Ke[Ge[32m[Success]e[39m  Successfully uploaded images
e[31m[Error]e[39m  Some services failed to build:
e[31m[Error]e[39m    Service: main
e[31m[Error]e[39m      Error: The command '/bin/sh -c apk add --no-cache make gcc g++ python &&   JOBS=MAX npm install -g node-red-node-serialport --production --silent &&   JOBS=MAX npm install -g node-red-contrib-modbus --production --silent &&   apk del make gcc g++ python &&   npm cache clean --force && rm -rf /tmp/*' returned a non-zero code: 1
e[31m[Error]e[39m  Not deploying release.

Has anyone an idea how to get it all working again :frowning:

Hi,

From the first build output, it looks like you’re not including the headers that it will need to build. I suspect adding linux-headers to your apk add line will rectify this.

Best regards, Heds

Hi yes, i noticed this aswell and tried it just now and the result is no fatal error, but still a failed build :frowning:

e[34m[main]e[39m  Step 7/9 : RUN apk add --no-cache make gcc g++ python linux-headers udev &&   JOBS=MAX npm install -g node-red-node-serialport --unsafe-perm --build-from-source --production --silent &&   JOBS=MAX npm install -g node-red-contrib-modbus --unsafe-perm --build-from-source --production --silent &&   apk del make gcc g++ python &&   npm cache clean --force && rm -rf /tmp/*
e[34m[main]e[39m   ---> Running in f8029267be99
e[34m[main]e[39m  fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/armhf/APKINDEX.tar.gz
e[34m[main]e[39m  fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/armhf/APKINDEX.tar.gz
e[34m[main]e[39m  (1/14) Installing binutils (2.30-r5)
e[34m[main]e[39m  (2/14) Installing isl (0.18-r0)
e[34m[main]e[39m  (3/14) Installing libgomp (6.4.0-r8)
e[34m[main]e[39m  (4/14) Installing libatomic (6.4.0-r8)
e[34m[main]e[39m  (5/14) Installing mpfr3 (3.1.5-r1)
e[34m[main]e[39m  (6/14) Installing mpc1 (1.0.3-r1)
e[34m[main]e[39m  (7/14) Installing gcc (6.4.0-r8)
e[34m[main]e[39m  (8/14) Installing musl-dev (1.1.19-r10)
e[34m[main]e[39m  (9/14) Installing libc-dev (0.7.1-r0)
e[34m[main]e[39m  (10/14) Installing g++ (6.4.0-r8)
e[34m[main]e[39m  (11/14) Installing linux-headers (4.4.6-r2)
e[34m[main]e[39m  (12/14) Installing make (4.2.1-r2)
e[34m[main]e[39m  (13/14) Installing gdbm (1.13-r1)
e[34m[main]e[39m  (14/14) Installing python2 (2.7.15-r0)
e[34m[main]e[39m  Executing busybox-1.28.4-r0.trigger
e[34m[main]e[39m  OK: 208 MiB in 84 packages
e[34m[main]e[39m  e[91m
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m/usr/local/lib/node_modules/node-red-node-serialport/node_modules/serialport/node_modules/prebuild-install/node_modules/which-pm-runs/index.js:11
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m  const pmSpec = userAgent.split(' ')[0]
e[34m[main]e[39m    ^^^^^
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91mSyntaxError: Use of const in strict mode.
e[34m[main]e[39m      at Module._compile (module.js:439:25)
e[34m[main]e[39m      at Object.Module._extensions..js (module.js:474:10)
e[34m[main]e[39m      at Module.load (module.js:356:32)
e[34m[main]e[39m      at Function.Module._load (module.js:312:12)
e[34m[main]e[39m      at Module.require (module.js:364:17)
e[34m[main]e[39m      at require (module.js:380:17)
e[34m[main]e[39m      at Object.<anonymous> (/usr/local/lib/node_modules/node-red-node-serialport/node_modules/serialport/node_modules/prebuild-install/bin.js:5:19)
e[34m[main]e[39m      at Module._compile (module.js:456:26)
e[34m[main]e[39m      at Object.Module._extensions..js (module.js:474:10)
e[34m[main]e[39m      at Module.load (module.js:356:32)
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  make: Entering directory '/usr/local/lib/node_modules/node-red-node-serialport/node_modules/serialport/build'
e[34m[main]e[39m    CXX(target) Release/obj.target/serialport/src/serialport.o
e[34m[main]e[39m    CXX(target) Release/obj.target/serialport/src/serialport_unix.o
e[34m[main]e[39m    CXX(target) Release/obj.target/serialport/src/poller.o
e[34m[main]e[39m    CXX(target) Release/obj.target/serialport/src/serialport_linux.o
e[34m[main]e[39m  e[91m../src/poller.cpp: In constructor 'Poller::Poller(int)':
e[34m[main]e[39m  ../src/poller.cpp:12:39: error: could not convert 'status' from 'int' to 'uv_err_t {aka uv_err_s}'
e[34m[main]e[39m       Nan::ThrowError(uv_strerror(status));
e[34m[main]e[39m                                         ^
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/poller.cpp: In member function 'void Poller::poll(int)':
e[34m[main]e[39m  ../src/poller.cpp:39:43: error: could not convert 'status' from 'int' to 'uv_err_t {aka uv_err_s}'
e[34m[main]e[39m       Nan::ThrowTypeError(uv_strerror(status));
e[34m[main]e[39m                                             ^
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/poller.cpp: In member function 'void Poller::stop()':
e[34m[main]e[39m  ../src/poller.cpp:47:43: error: could not convert 'status' from 'int' to 'uv_err_t {aka uv_err_s}'
e[34m[main]e[39m       Nan::ThrowTypeError(uv_strerror(status));
e[34m[main]e[39m                                             ^
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/poller.cpp: In static member function 'static void Poller::onData(uv_poll_t*, int, int)':
e[34m[main]e[39m  ../src/poller.cpp:58:75: error: could not convert 'status' from 'int' to 'uv_err_t {aka uv_err_s}'
e[34m[main]e[39m       argv[0] = v8::Exception::Error(Nan::New<v8::String>(uv_strerror(status)).ToLocalChecked());
e[34m[main]e[39m                                                                             ^
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/poller.cpp:69:29: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     obj->callback.Call(2, argv);
e[34m[main]e[39m                               ^
e[34m[main]e[39m  In file included from ../src/poller.cpp:1:0:
e[34m[main]e[39m  ../node_modules/nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterOpen(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:95:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(2, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../node_modules/nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterUpdate(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:150:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(1, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../node_modules/nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterClose(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:188:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(1, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../node_modules/nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterFlush(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:231:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(1, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../node_modules/nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterSet(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:285:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(1, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../node_modules/nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterGet(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:336:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(2, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../node_modules/nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterGetBaudRate(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:383:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(2, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../node_modules/nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91m../src/serialport.cpp: In function 'void EIO_AfterDrain(uv_work_t*)':
e[34m[main]e[39m  ../src/serialport.cpp:424:30: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations]
e[34m[main]e[39m     data->callback.Call(1, argv);
e[34m[main]e[39m                                ^
e[34m[main]e[39m  In file included from ../src/./serialport.h:6:0,
e[34m[main]e[39m                   from ../src/serialport.cpp:1:
e[34m[main]e[39m  ../node_modules/nan/nan.h:1618:3: note: declared here
e[34m[main]e[39m     Call(int argc, v8::Local<v8::Value> argv[]) const {
e[34m[main]e[39m     ^~~~
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  e[91mmake: *** [serialport.target.mk:91: Release/obj.target/serialport/src/poller.o] Error 1
e[34m[main]e[39m  make: *** Waiting for unfinished jobs....
e[34m[main]e[39m  e[0m
e[34m[main]e[39m  make: Leaving directory '/usr/local/lib/node_modules/node-red-node-serialport/node_modules/serialport/build'
e[34m[main]e[39m  Removing intermediate container f8029267be99
e[34m[main]e[39m  e[31mThe command '/bin/sh -c apk add --no-cache make gcc g++ python linux-headers udev &&   JOBS=MAX npm install -g node-red-node-serialport --unsafe-perm --build-from-source --production --silent &&   JOBS=MAX npm install -g node-red-contrib-modbus --unsafe-perm --build-from-source --production --silent &&   apk del make gcc g++ python &&   npm cache clean --force && rm -rf /tmp/*' returned a non-zero code: 1e[39m
e[36m[Info]e[39m  Uploading images
[================>                                  ] 33%e[2Ke[Ge[32m[Success]e[39m  Successfully uploaded images
e[31m[Error]e[39m  Some services failed to build:
e[31m[Error]e[39m    Service: main
e[31m[Error]e[39m      Error: The command '/bin/sh -c apk add --no-cache make gcc g++ python linux-headers udev &&   JOBS=MAX npm install -g node-red-node-serialport --unsafe-perm --build-from-source --production --silent &&   JOBS=MAX npm install -g node-red-contrib-modbus --unsafe-perm --build-from-source --production --silent &&   apk del make gcc g++ python &&   npm cache clean --force && rm -rf /tmp/*' returned a non-zero code: 1
e[31m[Error]e[39m  Not deploying release.

@hedss Do you have an idea what else can be wrong?

Hi,

This is because the version of Node that you’re inheriting from in the base image does not support ECMAScript 6 extensions. The LTS version of Node is 8.11.3, and I’d suggest using a version of the base image using this version.

You can find a full list of base image tags for NodeJS on Alpine for RPi3 here: https://hub.docker.com/r/resin/raspberrypi3-alpine-node/tags/

Best regards, Heds

1 Like

@hedss Ahh you are my hero! It works! :smiley:

I used the suggested img rapberrypi3-alpine:8.11.3 and now it does build again!

You really made my day and the upcoming weekend :smile:

Thnx!

You’re welcome, glad to be of assistance! :slight_smile: