hassio-addons/addon-node-red






The issue has been closed
npm_package install error #301
chhofi posted onGitHub
Problem/Motivation
Failed to install add-on: "node-red-contrib-amazondash"
Expected behavior
Successful installation (I tested the add-on before on a Raspian system and it works)
Troubleshooting
It seems like the add-on needs "make" and "g++" in order to execute correctly. For that reason I added them to my Config. I also tried it with "linux-headers" added... Did not seem to make a difference.
My Config:
{
"credential_secret": "sdfkljfdsajkhdfsabkljajlkh3",
"dark_mode": false,
"http_node": {
"username": "",
"password": ""
},
"http_static": {
"username": "",
"password": ""
},
"ssl": false,
"certfile": "fullchain.pem",
"keyfile": "privkey.pem",
"require_ssl": false,
"system_packages": [
"make",
"g++"
],
"npm_packages": [
"node-red-contrib-amazondash"
],
"init_commands": []
}
Unfortunately I still get errors :/
ERROR-> See log:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...
-----------------------------------------------------------
Hass.io Add-on: Node-RED
Flow-based programming for the Internet of Things
-----------------------------------------------------------
Add-on version: 4.1.1
You are running the latest version of this add-on.
System: HassOS 2.12 (armv7 / raspberrypi3)
Home Assistant version: 0.98.3
Supervisor version: 185
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] nginx.sh: executing...
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] node-red.sh: executing...
patching file nodes/ui_base.html
Hunk #1 succeeded at 1243 (offset 712 lines).
up to date in 1.093s
found 0 vulnerabilities
[cont-init.d] node-red.sh: exited 0.
[cont-init.d] user.sh: executing...
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/armv7/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/armv7/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/armv7/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/armv7/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/armv7/APKINDEX.tar.gz
v3.10.2-30-gcf6b144806 [http://dl-cdn.alpinelinux.org/alpine/v3.10/main]
v3.10.2-29-g112075e447 [http://dl-cdn.alpinelinux.org/alpine/v3.10/community]
v20190809-1694-g2d0c297c3e [http://dl-cdn.alpinelinux.org/alpine/edge/main]
v20190809-1691-gc88f7d8c51 [http://dl-cdn.alpinelinux.org/alpine/edge/community]
v20190809-1698-gfe4e601972 [http://dl-cdn.alpinelinux.org/alpine/edge/testing]
OK: 24482 distinct packages available
(1/1) Installing make (4.2.1-r2)
Executing busybox-1.30.1-r2.trigger
OK: 118 MiB in 53 packages
(1/11) Installing binutils (2.32-r0)
(2/11) Installing gmp (6.1.2-r1)
(3/11) Installing isl (0.18-r0)
(4/11) Installing libgomp (8.3.0-r0)
(5/11) Installing libatomic (8.3.0-r0)
(6/11) Installing mpfr3 (3.1.5-r1)
(7/11) Installing mpc1 (1.1.0-r0)
(8/11) Installing gcc (8.3.0-r0)
(9/11) Installing musl-dev (1.1.22-r3)
(10/11) Installing libc-dev (0.7.1-r0)
(11/11) Installing g++ (8.3.0-r0)
Executing busybox-1.30.1-r2.trigger
OK: 224 MiB in 64 packages
[11:14:04] INFO: Starting installation of custom NPM/Node-RED packages...```
^~~~~~~~~~~~
../socket_watcher.cpp:77:60: warning: 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(watcher->handle(), callback, argc, argv);
^
In file included from ../socket_watcher.hpp:8,
from ../socket_watcher.cpp:5:
../../nan/nan.h:959:46: note: declared here
NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
^~~~~~~~~~~~
../socket_watcher.cpp: In static member function 'static void SocketWatcher::Set(const Nan::FunctionCallbackInfo<v8::Value>&)':
../socket_watcher.cpp:116:32: warning: 'int32_t v8::Value::Int32Value() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
int fd = info[0]->Int32Value();
^
In file included from /root/.node-gyp/10.16.3/include/node/v8.h:26,
from /root/.node-gyp/10.16.3/include/node/node.h:63,
from ../../nan/nan.h:53,
from ../socket_watcher.hpp:8,
from ../socket_watcher.cpp:5:
/root/.node-gyp/10.16.3/include/node/v8.h:2478:46: note: declared here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^~~~~~~~~~
/root/.node-gyp/10.16.3/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
In file included from ../../nan/nan.h:53,
from ../socket_watcher.hpp:8,
from ../socket_watcher.cpp:5:
../socket_watcher.cpp: At global scope:
/root/.node-gyp/10.16.3/include/node/node.h:573:43: warning: cast between incompatible function types from 'void (*)(v8::Local<v8::Object>)' to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
(node::addon_register_func) (regfunc), \
^
/root/.node-gyp/10.16.3/include/node/node.h:607:3: note: in expansion of macro 'NODE_MODULE_X'
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^~~~~~~~~~~~~
../socket_watcher.cpp:143:1: note: in expansion of macro 'NODE_MODULE'
NODE_MODULE(socketwatcher, Init)
^~~~~~~~~~~
In file included from /root/.node-gyp/10.16.3/include/node/node.h:63,
from ../../nan/nan.h:53,
from ../socket_watcher.hpp:8,
from ../socket_watcher.cpp:5:
/root/.node-gyp/10.16.3/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/.node-gyp/10.16.3/include/node/node_object_wrap.h:84:78: required from here
/root/.node-gyp/10.16.3/include/node/v8.h:9502: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]
reinterpret_cast<Callback>(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.node-gyp/10.16.3/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>&)]':
../../nan/nan_object_wrap.h:65:61: required from here
/root/.node-gyp/10.16.3/include/node/v8.h:9502: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]
SOLINK_MODULE(target) Release/obj.target/socketwatcher.node
COPY Release/socketwatcher.node
make: Leaving directory '/opt/node_modules/socketwatcher/build'
> pcap@2.1.0 install /opt/node_modules/pcap
> node-gyp rebuild
make: Entering directory '/opt/node_modules/pcap/build'
CXX(target) Release/obj.target/pcap_binding/pcap_binding.o
../pcap_binding.cc:2:10: fatal error: pcap/pcap.h: No such file or directory
#include <pcap/pcap.h>
^~~~~~~~~~~~~
compilation terminated.
make: *** [pcap_binding.target.mk:100: Release/obj.target/pcap_binding/pcap_binding.o] Error 1
make: Leaving directory '/opt/node_modules/pcap/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:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.14.98-v7
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/pcap
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pcap@2.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pcap@2.1.0 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/2019-09-06T09_15_13_209Z-debug.log
[11:15:13] FATAL: Failed installing npm package node-red-contrib-amazondash
[cont-init.d] user.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing...
-----------------------------------------------------------
Oops! Something went wrong.
We are so sorry, but something went terribly wrong when
starting or running this add-on.
Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
I copied the logs from the UI, because the mentioned log path: /root/.npm/_logs/2019-09-06T09_15_13_209Z-debug.log does not seem to exist...