ankurp/homebridge-pi-thermostat

install error

Closed this issue · 1 comments

why this error?
node -v = 10.2.1
npm -v = 6.1.0

sudo npm install -g --unsafe-perm homebridge homebridge-pi-thermostat

node-dht-sensor@0.0.33 preinstall /usr/local/lib/node_modules/homebridge-pi-thermostat/node_modules/node-dht-sensor
./check-lib.sh

Library bcm2835 found.
/usr/local/bin/homebridge -> /usr/local/lib/node_modules/homebridge/bin/homebridge

epoll@0.1.22 install /usr/local/lib/node_modules/homebridge-pi-thermostat/node_modules/epoll
node-gyp rebuild

make: ingresso nella directory "/usr/local/lib/node_modules/homebridge-pi-thermostat/node_modules/epoll/build"
CXX(target) Release/obj.target/epoll/src/epoll.o
In file included from ../node_modules/nan/nan.h:192:0,
from ../src/epoll.cc:15:
../node_modules/nan/nan_maybe_43_inl.h: In function 'Nan::Maybe Nan::ForceSet(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Value, v8::PropertyAttribute)':
../node_modules/nan/nan_maybe_43_inl.h:112:15: error: 'class v8::Object' has no member named 'ForceSet'
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
^~~~~~~~
In file included from ../src/epoll.cc:15:0:
../node_modules/nan/nan.h: In function 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)':
../node_modules/nan/nan.h:835:60: warning: 'v8::Localv8::Value node::MakeCallback(v8::Isolate
, v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, func, argc, argv);
^
In file included from ../src/epoll.cc:12:0:
/root/.node-gyp/10.2.1/include/node/node.h:172:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^
/root/.node-gyp/10.2.1/include/node/node.h:88:42: note: in definition of macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/epoll.cc:15:0:
../node_modules/nan/nan.h: In function 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value
)':
../node_modules/nan/nan.h:850:62: warning: 'v8::Localv8::Value node::MakeCallback(v8::Isolate*, v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, symbol, argc, argv);
^
In file included from ../src/epoll.cc:12:0:
/root/.node-gyp/10.2.1/include/node/node.h:165:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^
/root/.node-gyp/10.2.1/include/node/node.h:88:42: note: in definition of macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/epoll.cc:15:0:
../node_modules/nan/nan.h: In function 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, const char
, int, v8::Localv8::Value)':
../node_modules/nan/nan.h:865:62: warning: 'v8::Localv8::Value node::MakeCallback(v8::Isolate
, v8::Localv8::Object, const char*, int, v8::Localv8::Value)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, method, argc, argv);
^
In file included from ../src/epoll.cc:12:0:
/root/.node-gyp/10.2.1/include/node/node.h:158:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^
/root/.node-gyp/10.2.1/include/node/node.h:88:42: note: in definition of macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/epoll.cc:15:0:
../node_modules/nan/nan.h: In member function 'v8::Localv8::Value Nan::Callback::Call_(v8::Isolate
, v8::Localv8::Object, int, v8::Localv8::Value) const':
../node_modules/nan/nan.h:1479:5: warning: 'v8::Localv8::Value node::MakeCallback(v8::Isolate
, v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
));
^
In file included from ../src/epoll.cc:12:0:
/root/.node-gyp/10.2.1/include/node/node.h:172:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^
/root/.node-gyp/10.2.1/include/node/node.h:88:42: note: in definition of macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^~~~~~~~~~
epoll.target.mk:95: set di istruzioni per l'obiettivo "Release/obj.target/epoll/src/epoll.o" non riuscito
make: *** [Release/obj.target/epoll/src/epoll.o] Errore 1
make: uscita dalla directory "/usr/local/lib/node_modules/homebridge-pi-thermostat/node_modules/epoll/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:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.14.34-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-pi-thermostat/node_modules/epoll
gyp ERR! node -v v10.2.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! epoll@0.1.22 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the epoll@0.1.22 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! /root/.npm/_logs/2018-06-09T12_57_47_479Z-debug.log
pi@raspberrypi:~ $ npm -v
6.1.0
pi@raspberrypi:~ $ node -v
v10.2.1
pi@raspberrypi:~ $ sudo npm install -g --unsafe-perm homebridge homebridge-pi-thermostat

node-dht-sensor@0.0.33 preinstall /usr/local/lib/node_modules/homebridge-pi-thermostat/node_modules/node-dht-sensor
./check-lib.sh

Library bcm2835 found.
/usr/local/bin/homebridge -> /usr/local/lib/node_modules/homebridge/bin/homebridge

epoll@0.1.22 install /usr/local/lib/node_modules/homebridge-pi-thermostat/node_modules/epoll
node-gyp rebuild

make: ingresso nella directory "/usr/local/lib/node_modules/homebridge-pi-thermostat/node_modules/epoll/build"
CXX(target) Release/obj.target/epoll/src/epoll.o
In file included from ../node_modules/nan/nan.h:192:0,
from ../src/epoll.cc:15:
../node_modules/nan/nan_maybe_43_inl.h: In function 'Nan::Maybe Nan::ForceSet(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Value, v8::PropertyAttribute)':
../node_modules/nan/nan_maybe_43_inl.h:112:15: error: 'class v8::Object' has no member named 'ForceSet'
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
^~~~~~~~
In file included from ../src/epoll.cc:15:0:
../node_modules/nan/nan.h: In function 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)':
../node_modules/nan/nan.h:835:60: warning: 'v8::Localv8::Value node::MakeCallback(v8::Isolate
, v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, func, argc, argv);
^
In file included from ../src/epoll.cc:12:0:
/root/.node-gyp/10.2.1/include/node/node.h:172:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^
/root/.node-gyp/10.2.1/include/node/node.h:88:42: note: in definition of macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/epoll.cc:15:0:
../node_modules/nan/nan.h: In function 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value
)':
../node_modules/nan/nan.h:850:62: warning: 'v8::Localv8::Value node::MakeCallback(v8::Isolate*, v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, symbol, argc, argv);
^
In file included from ../src/epoll.cc:12:0:
/root/.node-gyp/10.2.1/include/node/node.h:165:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^
/root/.node-gyp/10.2.1/include/node/node.h:88:42: note: in definition of macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/epoll.cc:15:0:
../node_modules/nan/nan.h: In function 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, const char
, int, v8::Localv8::Value)':
../node_modules/nan/nan.h:865:62: warning: 'v8::Localv8::Value node::MakeCallback(v8::Isolate
, v8::Localv8::Object, const char*, int, v8::Localv8::Value)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, method, argc, argv);
^
In file included from ../src/epoll.cc:12:0:
/root/.node-gyp/10.2.1/include/node/node.h:158:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^
/root/.node-gyp/10.2.1/include/node/node.h:88:42: note: in definition of macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/epoll.cc:15:0:
../node_modules/nan/nan.h: In member function 'v8::Localv8::Value Nan::Callback::Call_(v8::Isolate
, v8::Localv8::Object, int, v8::Localv8::Value) const':
../node_modules/nan/nan.h:1479:5: warning: 'v8::Localv8::Value node::MakeCallback(v8::Isolate
, v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
));
^
In file included from ../src/epoll.cc:12:0:
/root/.node-gyp/10.2.1/include/node/node.h:172:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^
/root/.node-gyp/10.2.1/include/node/node.h:88:42: note: in definition of macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^~~~~~~~~~
epoll.target.mk:95: set di istruzioni per l'obiettivo "Release/obj.target/epoll/src/epoll.o" non riuscito
make: *** [Release/obj.target/epoll/src/epoll.o] Errore 1
make: uscita dalla directory "/usr/local/lib/node_modules/homebridge-pi-thermostat/node_modules/epoll/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:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.14.34-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-pi-thermostat/node_modules/epoll
gyp ERR! node -v v10.2.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! epoll@0.1.22 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the epoll@0.1.22 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! /root/.npm/_logs/2018-06-09T13_03_23_472Z-debug.log

Can you try Node 8 as I am using that and it worked. Not sure if there are some breaking changes in Node 10 for the dependencies this uses.