pimatic / pimatic-homeduino

Pimatic plugin for using 433mhz devices and sensors with a connected Arduino with homeduino sketch
https://pimatic.org/
GNU General Public License v2.0
37 stars 29 forks source link

Can't install pimatic-homeduino, failed to install serialport@2.0.6 #74

Closed maxdaniel98 closed 7 years ago

maxdaniel98 commented 7 years ago

I'm trying to install pimatic-homeduino, but it fails on installing the dependencies. I tried installing it as root, install serialport manually, or install with --unsafe-perm, but still the installation fails. I'm thinking this is a bug.

OS: Raspbian GNU/Linux 8 Device: Raspberry Pi B2+

$ npm install pimatic-homeduino --unsafe-perm
[              ....] / extract:bluebird: verb gentlyRm don't care about contents; nuking /usr/share/pimatic/pimatic-app/node_modules/.st
[              ....] / extract:bluebird: verb gentlyRm don't care about contents; nuking /usr/share/pimatic/pimatic-app/node_modules/.st
[              ....] / extract:bluebird: verb gentlyRm don't care about contents; nuking /usr/share/pimatic/pimatic-app/node_modules/.st
[               ...] | preinstall:pimatic-homeduino: sill doParallel preinstall 217

[               ...] / finalize:strip-ansi: sill finalize /usr/share/pimatic/pimatic-app/node_modules/serialport/node_modules/node-pre-g
[               ...] / finalize:strip-ansi: sill finalize /usr/share/pimatic/pimatic-app/node_modules/serialport/node_modules/node-pre-g

> serialport@2.0.6 install /usr/share/pimatic/pimatic-app/node_modules/serialport
> node-pre-gyp install --fallback-to-build

make: Entering directory '/usr/share/pimatic/pimatic-app/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 /home/max/.node-gyp/6.9.2/include/node/v8.h:3031): 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 /home/max/.node-gyp/6.9.2/include/node/v8.h:4007): 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 /home/max/.node-gyp/6.9.2/include/node/v8.h:2750): 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 /home/max/.node-gyp/6.9.2/include/node/v8.h:8202): 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 /home/max/.node-gyp/6.9.2/include/node/v8.h:8202): 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 /home/max/.node-gyp/6.9.2/include/node/v8.h:8202): 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 /home/max/.node-gyp/6.9.2/include/node/v8.h:8166): 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 /home/max/.node-gyp/6.9.2/include/node/v8.h:8202): 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 /home/max/.node-gyp/6.9.2/include/node/v8.h:8202): 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 /home/max/.node-gyp/6.9.2/include/node/v8.h:8202): 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 /home/max/.node-gyp/6.9.2/include/node/v8.h:8202): 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 /home/max/.node-gyp/6.9.2/include/node/v8.h:8202): 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 /home/max/.node-gyp/6.9.2/include/node/v8.h:8166): 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 /home/max/.node-gyp/6.9.2/include/node/v8.h:8202): 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 /home/max/.node-gyp/6.9.2/include/node/v8.h:8202): 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 /home/max/.node-gyp/6.9.2/include/node/v8.h:8202): 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 /home/max/.node-gyp/6.9.2/include/node/v8.h:8202): 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 /home/max/.node-gyp/6.9.2/include/node/v8.h:8202): 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 /home/max/.node-gyp/6.9.2/include/node/v8.h:8202): 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 '/usr/share/pimatic/pimatic-app/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/local/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 4.4.13+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/share/pimatic/pimatic-app/node_modules/serialport/build/Release/node-v48-linux-arm/serialport.node" "--module_name=serialport" "--module_path=/usr/share/pimatic/pimatic-app/node_modules/serialport/build/Release/node-v48-linux-arm"
gyp ERR! cwd /usr/share/pimatic/pimatic-app/node_modules/serialport
gyp ERR! node -v v6.9.2
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/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/share/pimatic/pimatic-app/node_modules/serialport/build/Release/node-v48-linux-arm/serialport.node --module_name=serialport --module_path=/usr/share/pimatic/pimatic-app/node_modules/serialport/build/Release/node-v48-linux-arm' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/share/pimatic/pimatic-app/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:877:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 4.4.13+
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/share/pimatic/pimatic-app/node_modules/serialport/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/share/pimatic/pimatic-app/node_modules/serialport
node-pre-gyp ERR! node -v v6.9.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.18
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/share/pimatic/pimatic-app/node_modules/serialport/build/Release/node-v48-linux-arm/serialport.node --module_name=serialport --module_path=/usr/share/pimatic/pimatic-app/node_modules/serialport/build/Release/node-v48-linux-arm' (1)
/usr/share/pimatic/pimatic-app
└── UNMET PEER DEPENDENCY pimatic@0.9.37

npm WARN enoent ENOENT: no such file or directory, open '/usr/share/pimatic/pimatic-app/package.json'
npm WARN pimatic-buienradar@0.1.0 requires a peer of pimatic@0.8.* but none was installed.
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 4.4.13+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pimatic-homeduino" "--unsafe-perm"
npm ERR! node v6.9.2
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!     /usr/share/pimatic/pimatic-app/node_modules/npm-debug.log
npm ERR! code 1
mwittig commented 7 years ago

Make sure you have node version 4 (version v4.7.1 recommended) and npm version 2 (bundled with node 4) installed. Please also check which version of gcc is installed on your system.

It also looks like you haven installed pimatic properly! Please follow the instruction given at:

Please also use our forum for trouble shooting. Thanks!