Error Trying to install chatbot from Node-Red add-on in Hassio

Not sure if this belongs on a Node-Red forum or here, but since it’s within a Hassio add-on I figured I would start here in case it’s related to the add-on. I am trying to install the chat-bot module into node-red and it is failing. To my understanding, the npm install should install all the pre-requisites if any are missing but that looks like it is failing and I am at a loss of what I am missing. Any help would be appreciated. The log from the addon is below:

11 Mar 10:52:07 - [info] Installing module: node-red-contrib-chatbot, version: 0.16.5
11 Mar 10:54:42 - [warn] Installation of module node-red-contrib-chatbot failed:
11 Mar 10:54:42 - [warn] ------------------------------------------
11 Mar 10:54:42 - [warn] npm WARN deprecated [email protected]: use node-fetch instead
npm WARN deprecated [email protected]: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
[email protected] install /config/node-red/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.19.0/node-v57-linux-arm-musl.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI, musl) (falling back to source compile with node-gyp)
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 FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Linux 4.4.50
gyp ERR! command “/usr/bin/node” “/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “build” “–fallback-to-build” “–library=static_library” “–module=/config/node-red/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-musl/grpc_node.node” “–module_name=grpc_node” “–module_path=/config/node-red/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-musl” “–napi_version=3” “–node_abi_napi=napi” “–napi_build_version=0” “–node_napi_label=node-v57”
gyp ERR! cwd /config/node-red/node_modules/grpc
gyp ERR! node -v v8.14.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute ‘/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/config/node-red/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-musl/grpc_node.node --module_name=grpc_node --module_path=/config/node-red/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-musl --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57’ (1)
node-pre-gyp ERR! stack at ChildProcess. (/config/node-red/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Linux 4.4.50
node-pre-gyp ERR! command “/usr/bin/node” “/config/node-red/node_modules/grpc/node_modules/.bin/node-pre-gyp” “install” “–fallback-to-build” “–library=static_library”
node-pre-gyp ERR! cwd /config/node-red/node_modules/grpc
node-pre-gyp ERR! node -v v8.14.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute ‘/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/config/node-red/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-musl/grpc_node.node --module_name=grpc_node --module_path=/config/node-red/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-musl --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57’ (1)
npm WARN [email protected] requires a peer of bufferutil@^3.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of uws@^9.14.0 but none is installed. You must install peer dependencies yourself.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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-03-11T14_54_42_158Z-debug.log
11 Mar 10:54:42 - [warn] ------------------------------------------

Hi,
i have exact the same prpblem. Did you have a solution for this?

Regards,
Michael

Hi, same problem here. Any ideas?

I unfortunately, did not get any responses to the post, and I got sidetracked on some other projects and haven’t worked my way back to this one. If I figure it out I will definitely post the results here. If not, if anyone else has some ideas, let us know here.

So I got a little more information on this one. It’s not a solution but at least some steps that maybe we can get to one.

The Node-Red module is built and compiled as part of the npm install. So if you look at the log it shows that it can’t find the make command. The advice from the Node_Red forums is that on really minimal installs like HassIO the tools to build are not provided. So at least one package they feel would take care of the issue: build-essential should be enough, but if not python2.7-dev package would definitely cover it.

So i guess the question now is how do we get build-essential added to HassIO since we do not have a command line to add them in manually, or is there some addon that will include these for us?

1 Like

I’m having the same issue. Would love a solution to this. Tracking.

Also having this issue… really frustrating part is I had it working last year by including the “make” and “g++” system packages, but that no longer seems to be sufficient.

Found a solution:

system_packages:
  - musl
  - make
  - g++
npm_packages:
  - node-red-contrib-chatbot
init_commands: []
1 Like

It doesn’t work for me

you may need to install python 2.7

For what it’s worth it installs fine on raspberry Pi OS