hassio-addons/addon-node-red
Addon installs system packages after they are needed on start #796
mikenabhan posted onGitHub
Problem/Motivation
The addon appears to install system packages (make, etc) after they are needed for addon start. This makes some dependencies fail such as this node-gyp compile for iconv
Expected behavior
I would expect these system packages to be installed before they are needed.
Actual behavior
You are running the latest version of this add-on.
System: HassOS 4.17 (amd64 / qemux86-64)
Home Assistant Core: 0.118.5
Home Assistant Supervisor: 2020.12.6
-----------------------------------------------------------
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 1156 (offset 625 lines).
> iconv@2.1.11 install /config/node-red/node_modules/iconv
> node-gyp rebuild
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:168:21)
gyp ERR! System Linux 5.4.77
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /config/node-red/node_modules/iconv
gyp ERR! node -v v12.18.4
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
> node-icu-charset-detector@0.1.4 install /config/node-red/node_modules/node-icu-charset-detector
> node-gyp rebuild
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:168:21)
gyp ERR! System Linux 5.4.77
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /config/node-red/node_modules/node-icu-charset-detector
gyp ERR! node -v v12.18.4
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: iconv@2.1.11 (node_modules/iconv):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: iconv@2.1.11 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-icu-charset-detector@0.1.4 (node_modules/node-icu-charset-detector):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-icu-charset-detector@0.1.4 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
audited 1005 packages in 8.235s
38 packages are looking for funding
run `npm fund` for details
found 38 vulnerabilities (15 low, 9 moderate, 14 high)
run `npm audit fix` to fix them, or `npm audit` for details
[cont-init.d] node-red.sh: exited 0.
[cont-init.d] user.sh: executing...
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
v3.12.1-74-g54165f73d3 [http://dl-cdn.alpinelinux.org/alpine/v3.12/main]
v3.12.1-77-g2535715f9a [http://dl-cdn.alpinelinux.org/alpine/v3.12/community]
v20200917-4941-g3bc55a4361 [http://dl-cdn.alpinelinux.org/alpine/edge/main]
v20200917-4949-gb40298fe3b [http://dl-cdn.alpinelinux.org/alpine/edge/community]
v20200917-4946-g8739015c8c [http://dl-cdn.alpinelinux.org/alpine/edge/testing]
OK: 30141 distinct packages available
(1/1) Installing make (4.3-r0)
Executing busybox-1.31.1-r19.trigger
OK: 140 MiB in 52 packages
(1/12) Installing binutils (2.34-r1)
(2/12) Installing gmp (6.2.0-r0)
(3/12) Installing isl (0.18-r0)
(4/12) Installing libgomp (9.3.0-r2)
(5/12) Installing libatomic (9.3.0-r2)
(6/12) Installing libgphobos (9.3.0-r2)
(7/12) Installing mpfr4 (4.0.2-r4)
(8/12) Installing mpc1 (1.1.0-r1)
(9/12) Installing gcc (9.3.0-r2)
(10/12) Installing musl-dev (1.1.24-r10)
(11/12) Installing libc-dev (0.7.2-r3)
(12/12) Installing g++ (9.3.0-r2)
Executing busybox-1.31.1-r19.trigger
OK: 333 MiB in 64 packages
OK: 333 MiB in 64 packages
(1/1) Installing linux-headers (5.4.5-r1)
Steps to reproduce
(How can someone else make/see it happen)
Proposed changes
Change the order of what is happening at addon start to install packages earlier. I am not sure what iconv@2.1.11 install /config/node-red/node_modules/iconv comes from as I did not install this either.
Here is my config:
credential_secret: super_secret
dark_mode: false
http_node:
username: ''
password: ''
http_static:
username: ''
password: ''
ssl: true
certfile: fullchain.pem
keyfile: privkey.pem
require_ssl: true
system_packages:
- make
- g++
- gcc
- linux-headers
npm_packages: []
init_commands: []