Open AppStudioLB opened 8 months ago
Hi, while I install this library in my raspberry pi, I got this error. Please help me. Thank you.
pi@raspberrypi:~ $ sudo npm install -g homebridge-platform-orvibo npm ERR! code 1 npm ERR! path /usr/local/lib/node_modules/homebridge-platform-orvibo/node_modules/sleep npm ERR! command failed npm ERR! command sh -c node-gyp rebuild npm ERR! make: Entering directory '/usr/local/lib/node_modules/homebridge-platform-orvibo/node_modules/sleep/build' npm ERR! CXX(target) Release/obj.target/node_sleep/sleep.o npm ERR! make: Leaving directory '/usr/local/lib/node_modules/homebridge-platform-orvibo/node_modules/sleep/build' npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.3.0 npm ERR! gyp info using node@18.19.0 | linux | arm npm ERR! gyp info find Python using Python version 3.11.2 found at "/usr/bin/python3" npm ERR! gyp info spawn /usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/usr/share/nodejs/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/usr/local/lib/node_modules/homebridge-platform-orvibo/node_modules/sleep/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/usr/share/nodejs/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/usr/include/nodejs/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/usr/include/nodejs', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/share/nodejs/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/usr/include/nodejs/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/usr/local/lib/node_modules/homebridge-platform-orvibo/node_modules/sleep', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn make npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! ../sleep.cc:6:11: error: ‘Handle’ has not been declared in ‘v8’ npm ERR! 6 | using v8::Handle; npm ERR! | ^~~~~~ npm ERR! ../sleep.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Sleep(Nan::NAN_METHOD_ARGS_TYPE)’: npm ERR! ../sleep.cc:42:29: error: no matching function for call to ‘v8::Value::Uint32Value()’ npm ERR! 42 | sleep(info[0]->Uint32Value()); npm ERR! | ~~~~~~~~~~~~~~~~~~~~^~ npm ERR! In file included from /usr/include/nodejs/deps/v8/include/v8-primitive.h:11, npm ERR! from /usr/include/nodejs/deps/v8/include/v8-object.h:11, npm ERR! from /usr/include/nodejs/deps/v8/include/v8-array-buffer.h:13, npm ERR! from /usr/include/nodejs/deps/v8/include/v8.h:24, npm ERR! from /usr/include/nodejs/src/node.h:73, npm ERR! from ../../nan/nan.h:62, npm ERR! from ../sleep.cc:2: npm ERR! /usr/include/nodejs/deps/v8/include/v8-value.h:416:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’ npm ERR! 416 | V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value( npm ERR! | ^~~~~~~~~~~ npm ERR! /usr/include/nodejs/deps/v8/include/v8-value.h:416:41: note: candidate expects 1 argument, 0 provided npm ERR! ../sleep.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE USleep(Nan::NAN_METHOD_ARGS_TYPE)’: npm ERR! ../sleep.cc:54:30: error: no matching function for call to ‘v8::Value::Uint32Value()’ npm ERR! 54 | usleep(info[0]->Uint32Value()); npm ERR! | ~~~~~~~~~~~~~~~~~~~~^~ npm ERR! /usr/include/nodejs/deps/v8/include/v8-value.h:416:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’ npm ERR! 416 | V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value( npm ERR! | ^~~~~~~~~~~ npm ERR! /usr/include/nodejs/deps/v8/include/v8-value.h:416:41: note: candidate expects 1 argument, 0 provided npm ERR! ../sleep.cc: In function ‘void init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’: npm ERR! ../sleep.cc:62:51: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’ npm ERR! 62 | Nan::New<FunctionTemplate>(Sleep)->GetFunction()); npm ERR! | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ npm ERR! In file included from /usr/include/nodejs/deps/v8/include/v8-function.h:15, npm ERR! from /usr/include/nodejs/deps/v8/include/v8.h:33: npm ERR! /usr/include/nodejs/deps/v8/include/v8-template.h:513:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’ npm ERR! 513 | V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction( npm ERR! | ^~~~~~~~~~~ npm ERR! /usr/include/nodejs/deps/v8/include/v8-template.h:513:46: note: candidate expects 1 argument, 0 provided npm ERR! ../sleep.cc:64:52: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’ npm ERR! 64 | Nan::New<FunctionTemplate>(USleep)->GetFunction()); npm ERR! | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ npm ERR! /usr/include/nodejs/deps/v8/include/v8-template.h:513:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’ npm ERR! 513 | V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction( npm ERR! | ^~~~~~~~~~~ npm ERR! /usr/include/nodejs/deps/v8/include/v8-template.h:513:46: note: candidate expects 1 argument, 0 provided npm ERR! ../sleep.cc: At global scope: npm ERR! /usr/include/nodejs/src/node.h:1014:7: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type] npm ERR! 1014 | (node::addon_register_func) (regfunc), \ npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! /usr/include/nodejs/src/node.h:1048:3: note: in expansion of macro ‘NODE_MODULE_X’ npm ERR! 1048 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage) npm ERR! | ^~~~~~~~~~~~~ npm ERR! ../sleep.cc:68:1: note: in expansion of macro ‘NODE_MODULE’ npm ERR! 68 | NODE_MODULE(node_sleep, init) npm ERR! | ^~~~~~~~~~~ npm ERR! make: *** [node_sleep.target.mk:109: Release/obj.target/node_sleep/sleep.o] Error 1 npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2 npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/share/nodejs/node-gyp/lib/build.js:203:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:517:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:292:12) npm ERR! gyp ERR! System Linux 6.1.0-rpi7-rpi-v7 npm ERR! gyp ERR! command "/usr/bin/node" "/usr/share/nodejs/node-gyp/bin/node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd /usr/local/lib/node_modules/homebridge-platform-orvibo/node_modules/sleep npm ERR! gyp ERR! node -v v18.19.0 npm ERR! gyp ERR! node-gyp -v v9.3.0 npm ERR! gyp ERR! not ok npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2024-02-26T22_50_20_947Z-debug-0.log
Hi, while I install this library in my raspberry pi, I got this error. Please help me. Thank you.