hassio-addons/addon-node-red



The issue has been closed
Unable to install I2c module #493
dmburmagin posted onGitHub
I install node-red-contrib-i2c config:
credential_secret: ******
dark_mode: false
http_node:
username: ***
password: ***
http_static:
username: ***
password: ***
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem
require_ssl: true
system_packages:
- make
- g++
- linux-headers
npm_packages:
- node-red-contrib-i2c
init_commands:
i get:
...
2613 | V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
| ^~~~~~~~~~
/root/.cache/node-gyp/12.15.0/include/node/v8.h:2613:40: note: candidate expects 1 argument, 0 provided
In file included from ../src/i2c.cc:107:
../src/./writequick.cc:61:34: error: no matching function for call to 'v8::Value::Int32Value()'
61 | __u8 bit = info[1]->Int32Value();
| ^
In file included from /root/.cache/node-gyp/12.15.0/include/node/node.h:63,
from ../src/i2c.cc:1:
/root/.cache/node-gyp/12.15.0/include/node/v8.h:2613:40: note: candidate: 'v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const'
2613 | V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
| ^~~~~~~~~~
/root/.cache/node-gyp/12.15.0/include/node/v8.h:2613:40: note: candidate expects 1 argument, 0 provided
/root/.cache/node-gyp/12.15.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]':
/root/.cache/node-gyp/12.15.0/include/node/node_object_wrap.h:84:78: required from here
/root/.cache/node-gyp/12.15.0/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<node::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
10004 | reinterpret_cast<Callback>(callback), type);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.cache/node-gyp/12.15.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]':
../node_modules/nan/nan_object_wrap.h:66:61: required from here
/root/.cache/node-gyp/12.15.0/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
make: *** [i2c.target.mk:105: Release/obj.target/i2c/src/i2c.o] Error 1
make: Leaving directory '/opt/node_modules/i2c-bus/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:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:223:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.19.97-v7l+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/node_modules/i2c-bus
gyp ERR! node -v v12.15.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! i2c-bus@1.2.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the i2c-bus@1.2.5 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/2020-03-05T10_26_29_757Z-debug.log
[13:26:29] FATAL: Failed to install a specified npm package
[cont-init.d] user.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing...
System Raspberry PI4 + Raspbian + hass.io