cat /etc/debian_version; gcc -v; uname -a; node -v; npm --version
8.4
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.9/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.9.2 (Debian 4.9.2-10)
Linux bananapi 3.4.111-bananian #5 SMP PREEMPT Fri Mar 25 17:24:42 UTC 2016 armv7l GNU/Linux
v7.1.0
3.10.9
---------------------
make: Leaving directory '/home/pi/pimatic-app/node_modules/serialport/build'
/home/pi/pimatic-app
└─┬ serialport@4.0.6
└── debug@2.3.3
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/pimatic-app/package.json'
npm WARN pimatic-app No description
npm WARN pimatic-app No repository field.
npm WARN pimatic-app No README data
npm WARN pimatic-app No license field.
npm install serialport 139.24s user 13.42s system 106% cpu 2:23.65 total
root@bananapi /home/pi/pimatic-app # ls
config.json core etc node_modules pimatic-daemon.log pimatic-database.sqlite serialport_test2.js serialport_test.js
root@bananapi /home/pi/pimatic-app # nano serialport_test_read.js
root@bananapi /home/pi/pimatic-app # more serialport_test2
serialport_test2: No such file or directory
root@bananapi /home/pi/pimatic-app # more serialport_test2.js
var serialport = require('serialport');// include the library
SerialPort = serialport.SerialPort; // make a local instance of it
var myPort = new SerialPort('/dev/ttyS1', {
baudRate: 115200,
// look for return and newline at the end of each data packet:
parser: serialport.parsers.readline("\n")
});
root@bananapi /home/pi/pimatic-app # nano serialport_test_read.js
root@bananapi /home/pi/pimatic-app # nodejs serialport_test_read.js
DEPRECATION: Please use `require('serialport')` instead of `require('serialport').SerialPort`
Port open
Message ID=100 Data=14 55 0C 00 00
Message ID=100 Data=11 65 00
-----------------------------
root@bananapi /home/pi/pimatic-app # npm install pimatic-homeduino
> serialport@2.0.6 install /home/pi/pimatic-app/node_modules/homeduino/node_modules/serialport
> node-pre-gyp install --fallback-to-build
make: Entering directory '/home/pi/pimatic-app/node_modules/homeduino/node_modules/serialport/build'
CXX(target) Release/obj.target/serialport/src/serialport.o
In file included from ../../nan/nan.h:182:0,
from ../src/serialport.h:5,
from ../src/serialport.cpp:3:
../../nan/nan_maybe_43_inl.h: In function ‘Nan::MaybeLocal<v8::Object> Nan::CloneElementAt(v8::Local<v8::Array>, uint32_t)’:
../../nan/nan_maybe_43_inl.h:221:58: warning: ‘v8::MaybeLocal<v8::Object> v8::Array::CloneElementAt(v8::Local<v8::Context>, uint32_t)’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:3055): Cloning is not supported. [-Wdeprecated-declarations]
return array->CloneElementAt(GetCurrentContext(), index);
^
In file included from ../../nan/nan_new.h:189:0,
from ../../nan/nan.h:188,
from ../src/serialport.h:5,
from ../src/serialport.cpp:3:
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::BooleanObject>::return_t Nan::imp::Factory<v8::BooleanObject>::New(bool)’:
../../nan/nan_implementation_12_inl.h:40:38: warning: ‘static v8::Local<v8::Value> v8::BooleanObject::New(bool)’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:4048): Pass an isolate [-Wdeprecated-declarations]
return v8::BooleanObject::New(value).As<v8::BooleanObject>();
^
In file included from ../src/serialport.h:5:0,
from ../src/serialport.cpp:3:
../../nan/nan.h: At global scope:
../../nan/nan.h:590:20: error: variable or field ‘AddGCEpilogueCallback’ declared void
v8::Isolate::GCEpilogueCallback callback
^
../../nan/nan.h:590:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCEpilogueCallback callback
^
../../nan/nan.h:591:18: error: expected primary-expression before ‘gc_type_filter’
, v8::GCType gc_type_filter = v8::kGCTypeAll) {
^
../../nan/nan.h:596:20: error: variable or field ‘RemoveGCEpilogueCallback’ declared void
v8::Isolate::GCEpilogueCallback callback) {
^
../../nan/nan.h:596:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCEpilogueCallback callback) {
^
../../nan/nan.h:601:20: error: variable or field ‘AddGCPrologueCallback’ declared void
v8::Isolate::GCPrologueCallback callback
^
../../nan/nan.h:601:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCPrologueCallback callback
^
../../nan/nan.h:602:18: error: expected primary-expression before ‘gc_type_filter’
, v8::GCType gc_type_filter = v8::kGCTypeAll) {
^
../../nan/nan.h:607:20: error: variable or field ‘RemoveGCPrologueCallback’ declared void
v8::Isolate::GCPrologueCallback callback) {
^
../../nan/nan.h:607:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCPrologueCallback callback) {
^
../../nan/nan.h: In function ‘bool Nan::SetAccessor(v8::Local<v8::Object>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’:
../../nan/nan.h:1933:16: warning: ‘bool v8::Object::SetAccessor(v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:2760): Use maybe version [-Wdeprecated-declarations]
, attribute);
^
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Open(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:115:116: warning: ‘v8::Local<v8::Int32> v8::Value::ToInt32() const’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:8442): Use maybe version [-Wdeprecated-declarations]
baton->baudRate = Nan::Get(options, Nan::New<v8::String>("baudRate").ToLocalChecked()).ToLocalChecked()->ToInt32()->Int32Value();
^
../src/serialport.cpp:116:116: warning: ‘v8::Local<v8::Int32> v8::Value::ToInt32() const’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:8442): Use maybe version [-Wdeprecated-declarations]
baton->dataBits = Nan::Get(options, Nan::New<v8::String>("dataBits").ToLocalChecked()).ToLocalChecked()->ToInt32()->Int32Value();
^
../src/serialport.cpp:117:120: warning: ‘v8::Local<v8::Int32> v8::Value::ToInt32() const’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:8442): Use maybe version [-Wdeprecated-declarations]
baton->bufferSize = Nan::Get(options, Nan::New<v8::String>("bufferSize").ToLocalChecked()).ToLocalChecked()->ToInt32()->Int32Value();
^
../src/serialport.cpp:119:131: warning: ‘v8::Local<v8::Number> v8::Value::ToNumber() const’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:8406): Use maybe version [-Wdeprecated-declarations]
baton->stopBits = ToStopBitEnum(Nan::Get(options, Nan::New<v8::String>("stopBits").ToLocalChecked()).ToLocalChecked()->ToNumber()->NumberValue());
^
../src/serialport.cpp: In function ‘void EIO_AfterOpen(uv_work_t*)’:
../src/serialport.cpp:159:31: warning: ‘v8::Local<v8::Int32> v8::Value::ToInt32() const’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:8442): Use maybe version [-Wdeprecated-declarations]
int fd = argv[1]->ToInt32()->Int32Value();
^
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Update(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:180:29: warning: ‘v8::Local<v8::Int32> v8::Value::ToInt32() const’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:8442): Use maybe version [-Wdeprecated-declarations]
int fd = info[0]->ToInt32()->Int32Value();
^
../src/serialport.cpp:199:116: warning: ‘v8::Local<v8::Int32> v8::Value::ToInt32() const’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:8442): Use maybe version [-Wdeprecated-declarations]
baton->baudRate = Nan::Get(options, Nan::New<v8::String>("baudRate").ToLocalChecked()).ToLocalChecked()->ToInt32()->Int32Value();
^
../src/serialport.cpp:200:116: warning: ‘v8::Local<v8::Int32> v8::Value::ToInt32() const’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:8442): Use maybe version [-Wdeprecated-declarations]
baton->dataBits = Nan::Get(options, Nan::New<v8::String>("dataBits").ToLocalChecked()).ToLocalChecked()->ToInt32()->Int32Value();
^
../src/serialport.cpp:201:120: warning: ‘v8::Local<v8::Int32> v8::Value::ToInt32() const’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:8442): Use maybe version [-Wdeprecated-declarations]
baton->bufferSize = Nan::Get(options, Nan::New<v8::String>("bufferSize").ToLocalChecked()).ToLocalChecked()->ToInt32()->Int32Value();
^
../src/serialport.cpp:203:131: warning: ‘v8::Local<v8::Number> v8::Value::ToNumber() const’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:8406): Use maybe version [-Wdeprecated-declarations]
baton->stopBits = ToStopBitEnum(Nan::Get(options, Nan::New<v8::String>("stopBits").ToLocalChecked()).ToLocalChecked()->ToNumber()->NumberValue());
^
../src/serialport.cpp: In function ‘void EIO_AfterUpdate(uv_work_t*)’:
../src/serialport.cpp:242:31: warning: ‘v8::Local<v8::Int32> v8::Value::ToInt32() const’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:8442): Use maybe version [-Wdeprecated-declarations]
int fd = argv[1]->ToInt32()->Int32Value();
^
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Write(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:263:29: warning: ‘v8::Local<v8::Int32> v8::Value::ToInt32() const’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:8442): Use maybe version [-Wdeprecated-declarations]
int fd = info[0]->ToInt32()->Int32Value();
^
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Close(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:374:29: warning: ‘v8::Local<v8::Int32> v8::Value::ToInt32() const’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:8442): Use maybe version [-Wdeprecated-declarations]
int fd = info[0]->ToInt32()->Int32Value();
^
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Flush(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:493:29: warning: ‘v8::Local<v8::Int32> v8::Value::ToInt32() const’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:8442): Use maybe version [-Wdeprecated-declarations]
int fd = info[0]->ToInt32()->Int32Value();
^
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:542:29: warning: ‘v8::Local<v8::Int32> v8::Value::ToInt32() const’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:8442): Use maybe version [-Wdeprecated-declarations]
int fd = info[0]->ToInt32()->Int32Value();
^
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Drain(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:603:29: warning: ‘v8::Local<v8::Int32> v8::Value::ToInt32() const’ is deprecated (declared at /root/.node-gyp/7.1.0/include/node/v8.h:8442): Use maybe version [-Wdeprecated-declarations]
int fd = info[0]->ToInt32()->Int32Value();
^
serialport.target.mk:94: recipe for target 'Release/obj.target/serialport/src/serialport.o' failed
make: *** [Release/obj.target/serialport/src/serialport.o] Error 1
make: Leaving directory '/home/pi/pimatic-app/node_modules/homeduino/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:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 3.4.111-bananian
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/pimatic-app/node_modules/homeduino/node_modules/serialport/build/Release/node-v51-linux-arm/serialport.node" "--module_name=serialport" "--module_path=/home/pi/pimatic-app/node_modules/homeduino/node_modules/serialport/build/Release/node-v51-linux-arm"
gyp ERR! cwd /home/pi/pimatic-app/node_modules/homeduino/node_modules/serialport
gyp ERR! node -v v7.1.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/nodejs /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/pimatic-app/node_modules/homeduino/node_modules/serialport/build/Release/node-v51-linux-arm/serialport.node --module_name=serialport --module_path=/home/pi/pimatic-app/node_modules/homeduino/node_modules/serialport/build/Release/node-v51-linux-arm' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/pi/pimatic-app/node_modules/homeduino/node_modules/serialport/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:885:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 3.4.111-bananian
node-pre-gyp ERR! command "/usr/bin/nodejs" "/home/pi/pimatic-app/node_modules/homeduino/node_modules/serialport/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/pi/pimatic-app/node_modules/homeduino/node_modules/serialport
node-pre-gyp ERR! node -v v7.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.18
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/nodejs /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/pimatic-app/node_modules/homeduino/node_modules/serialport/build/Release/node-v51-linux-arm/serialport.node --module_name=serialport --module_path=/home/pi/pimatic-app/node_modules/homeduino/node_modules/serialport/build/Release/node-v51-linux-arm' (1)
/home/pi/pimatic-app
└── (empty)
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/pimatic-app/package.json'
npm WARN pimatic-app No description
npm WARN pimatic-app No repository field.
npm WARN pimatic-app No README data
npm WARN pimatic-app No license field.
npm ERR! Linux 3.4.111-bananian
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "pimatic-homeduino"
npm ERR! node v7.1.0
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! serialport@2.0.6 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@2.0.6 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the serialport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs serialport
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls serialport
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/pimatic-app/npm-debug.log
npm ERR! code 1
npm install pimatic-homeduino 168.63s user 17.34s system 107% cpu 2:52.45 total
1