node-red-contrib-chatbot icon indicating copy to clipboard operation
node-red-contrib-chatbot copied to clipboard

Failed to install in Node Red Home Assistant addon

Open xrvm63 opened this issue 3 years ago • 6 comments

Please help.

2021-03-30T20:13:59.743Z Установить : node-red-contrib-chatbot 0.19.7

2021-03-30T20:13:59.820Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production [email protected] 2021-03-30T20:14:12.569Z [err] npm WARN 2021-03-30T20:14:12.569Z [err] deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future 2021-03-30T20:14:15.790Z [err] npm 2021-03-30T20:14:15.790Z [err]
2021-03-30T20:14:15.790Z [err] WARN 2021-03-30T20:14:15.790Z [err]
2021-03-30T20:14:15.790Z [err] deprecated 2021-03-30T20:14:15.790Z [err] [email protected]: Please see https://github.com/lydell/urix#deprecated 2021-03-30T20:14:15.793Z [err] npm 2021-03-30T20:14:15.793Z [err]
2021-03-30T20:14:15.793Z [err] WARN 2021-03-30T20:14:15.793Z [err]
2021-03-30T20:14:15.793Z [err] deprecated 2021-03-30T20:14:15.794Z [err] [email protected]: https://github.com/lydell/resolve-url#deprecated 2021-03-30T20:14:16.166Z [err] npm 2021-03-30T20:14:16.166Z [err]
2021-03-30T20:14:16.166Z [err] WARN 2021-03-30T20:14:16.166Z [err]
2021-03-30T20:14:16.166Z [err] deprecated 2021-03-30T20:14:16.167Z [err] [email protected]: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410 2021-03-30T20:14:16.654Z [err] npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. 2021-03-30T20:14:17.225Z [err] npm WARN 2021-03-30T20:14:17.225Z [err] deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future 2021-03-30T20:14:23.928Z [err] npm 2021-03-30T20:14:23.928Z [err]
2021-03-30T20:14:23.928Z [err] WARN 2021-03-30T20:14:23.928Z [err]
2021-03-30T20:14:23.928Z [err] deprecated 2021-03-30T20:14:23.928Z [err] [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 2021-03-30T20:14:43.096Z [out] 2021-03-30T20:14:43.096Z [out] > [email protected] install /config/node-red/node_modules/sqlite3 2021-03-30T20:14:43.096Z [out] > node-pre-gyp install --fallback-to-build 2021-03-30T20:14:43.096Z [out] 2021-03-30T20:14:43.467Z [err] node-pre-gyp 2021-03-30T20:14:43.468Z [err] WARN Using request for node-pre-gyp https download 2021-03-30T20:14:43.468Z [err]
2021-03-30T20:14:44.204Z [err] node-pre-gyp 2021-03-30T20:14:44.205Z [err] WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v83-linux-x64.tar.gz 2021-03-30T20:14:44.205Z [err] node-pre-gyp WARN 2021-03-30T20:14:44.205Z [err] Pre-built binaries not found for [email protected] and [email protected] (node-v83 ABI, musl) (falling back to source compile with node-gyp) 2021-03-30T20:14:45.344Z [err] gyp 2021-03-30T20:14:45.345Z [err]
2021-03-30T20:14:45.345Z [err] ERR! 2021-03-30T20:14:45.345Z [err]
2021-03-30T20:14:45.345Z [err] build error 2021-03-30T20:14:45.345Z [err]
2021-03-30T20:14:45.346Z [err] gyp 2021-03-30T20:14:45.346Z [err]
2021-03-30T20:14:45.346Z [err] ERR! 2021-03-30T20:14:45.347Z [err]
2021-03-30T20:14:45.347Z [err] stack 2021-03-30T20:14:45.347Z [err] Error: not found: make 2021-03-30T20:14:45.347Z [err] gyp 2021-03-30T20:14:45.347Z [err]
2021-03-30T20:14:45.347Z [err] ERR! 2021-03-30T20:14:45.347Z [err]
2021-03-30T20:14:45.347Z [err] stack 2021-03-30T20:14:45.347Z [err] at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12) 2021-03-30T20:14:45.348Z [err] gyp 2021-03-30T20:14:45.348Z [err]
2021-03-30T20:14:45.348Z [err] ERR! 2021-03-30T20:14:45.348Z [err]
2021-03-30T20:14:45.348Z [err] stack 2021-03-30T20:14:45.348Z [err] at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19) 2021-03-30T20:14:45.348Z [err] gyp 2021-03-30T20:14:45.348Z [err]
2021-03-30T20:14:45.348Z [err] ERR! 2021-03-30T20:14:45.348Z [err]
2021-03-30T20:14:45.349Z [err] stack 2021-03-30T20:14:45.349Z [err] at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29) 2021-03-30T20:14:45.349Z [err] gyp 2021-03-30T20:14:45.349Z [err]
2021-03-30T20:14:45.349Z [err] ERR! 2021-03-30T20:14:45.349Z [err]
2021-03-30T20:14:45.349Z [err] stack 2021-03-30T20:14:45.349Z [err] at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16 2021-03-30T20:14:45.349Z [err] gyp 2021-03-30T20:14:45.350Z [err]
2021-03-30T20:14:45.350Z [err] ERR! 2021-03-30T20:14:45.350Z [err]
2021-03-30T20:14:45.350Z [err] stack 2021-03-30T20:14:45.350Z [err] at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5 2021-03-30T20:14:45.350Z [err] gyp 2021-03-30T20:14:45.350Z [err]
2021-03-30T20:14:45.350Z [err] ERR! 2021-03-30T20:14:45.350Z [err]
2021-03-30T20:14:45.350Z [err] stack 2021-03-30T20:14:45.350Z [err] at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5 2021-03-30T20:14:45.351Z [err] gyp 2021-03-30T20:14:45.351Z [err]
2021-03-30T20:14:45.351Z [err] ERR! 2021-03-30T20:14:45.351Z [err]
2021-03-30T20:14:45.351Z [err] stack 2021-03-30T20:14:45.351Z [err] at FSReqCallback.oncomplete (fs.js:183:21) 2021-03-30T20:14:45.351Z [err] gyp 2021-03-30T20:14:45.351Z [err]
2021-03-30T20:14:45.352Z [err] ERR! 2021-03-30T20:14:45.352Z [err]
2021-03-30T20:14:45.352Z [err] System 2021-03-30T20:14:45.352Z [err] Linux 4.19.0-16-amd64 2021-03-30T20:14:45.352Z [err] gyp 2021-03-30T20:14:45.352Z [err]
2021-03-30T20:14:45.352Z [err] ERR! 2021-03-30T20:14:45.352Z [err]
2021-03-30T20:14:45.352Z [err] command 2021-03-30T20:14:45.353Z [err] "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83" 2021-03-30T20:14:45.353Z [err] gyp 2021-03-30T20:14:45.353Z [err]
2021-03-30T20:14:45.353Z [err] ERR! 2021-03-30T20:14:45.353Z [err]
2021-03-30T20:14:45.353Z [err] cwd 2021-03-30T20:14:45.353Z [err] /config/node-red/node_modules/sqlite3 2021-03-30T20:14:45.353Z [err] gyp 2021-03-30T20:14:45.353Z [err]
2021-03-30T20:14:45.354Z [err] ERR! 2021-03-30T20:14:45.354Z [err]
2021-03-30T20:14:45.354Z [err] node -v 2021-03-30T20:14:45.354Z [err] v14.16.0 2021-03-30T20:14:45.354Z [err] gyp 2021-03-30T20:14:45.354Z [err]
2021-03-30T20:14:45.354Z [err] ERR! 2021-03-30T20:14:45.354Z [err]
2021-03-30T20:14:45.354Z [err] node-gyp -v 2021-03-30T20:14:45.354Z [err] v5.1.0 2021-03-30T20:14:45.355Z [err] gyp 2021-03-30T20:14:45.355Z [err]
2021-03-30T20:14:45.355Z [err] ERR! 2021-03-30T20:14:45.355Z [err]
2021-03-30T20:14:45.355Z [err] not ok 2021-03-30T20:14:45.355Z [err]
2021-03-30T20:14:45.358Z [err] node-pre-gyp 2021-03-30T20:14:45.358Z [err] ERR! build error 2021-03-30T20:14:45.359Z [err] node-pre-gyp ERR! stack 2021-03-30T20:14:45.359Z [err] Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1) 2021-03-30T20:14:45.359Z [err] node-pre-gyp ERR! stack at ChildProcess. (/config/node-red/node_modules/node-pre-gyp/lib/util/compile.js:83:29) 2021-03-30T20:14:45.359Z [err] node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20) 2021-03-30T20:14:45.359Z [err] node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16) 2021-03-30T20:14:45.359Z [err] node-pre-gyp ERR! 2021-03-30T20:14:45.359Z [err] stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) 2021-03-30T20:14:45.359Z [err] node-pre-gyp ERR! System 2021-03-30T20:14:45.360Z [err] Linux 4.19.0-16-amd64 2021-03-30T20:14:45.360Z [err] node-pre-gyp ERR! 2021-03-30T20:14:45.360Z [err] command "/usr/bin/node" "/config/node-red/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" 2021-03-30T20:14:45.360Z [err] node-pre-gyp ERR! 2021-03-30T20:14:45.360Z [err] cwd /config/node-red/node_modules/sqlite3 2021-03-30T20:14:45.360Z [err] node-pre-gyp 2021-03-30T20:14:45.360Z [err] ERR! node -v v14.16.0 2021-03-30T20:14:45.360Z [err] node-pre-gyp 2021-03-30T20:14:45.360Z [err] ERR! node-pre-gyp -v v0.11.0 2021-03-30T20:14:45.360Z [err] node-pre-gyp 2021-03-30T20:14:45.360Z [err] ERR! not ok 2021-03-30T20:14:45.361Z [out] Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1) 2021-03-30T20:14:46.746Z [err] npm 2021-03-30T20:14:46.746Z [err] WARN [email protected] requires a peer of @discordjs/uws@^10.149.0 but none is installed. You must install peer dependencies yourself. 2021-03-30T20:14:46.763Z [err] npm WARN [email protected] requires a peer of typescript@>=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev but none is installed. You must install peer dependencies yourself. 2021-03-30T20:14:46.780Z [err] npm WARN [email protected] requires a peer of typescript@>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev but none is installed. You must install peer dependencies yourself. 2021-03-30T20:14:46.790Z [err] npm WARN [email protected] requires a peer of @types/[email protected] but none is installed. You must install peer dependencies yourself. 2021-03-30T20:14:46.801Z [err] npm WARN [email protected] requires a peer of babel-core@6 but none is installed. You must install peer dependencies yourself. 2021-03-30T20:14:46.813Z [err] npm WARN [email protected] requires a peer of webpack@2 || 3 || 4 but none is installed. You must install peer dependencies yourself. 2021-03-30T20:14:46.813Z [err] 2021-03-30T20:14:46.835Z [err] npm ERR! code ELIFECYCLE 2021-03-30T20:14:46.835Z [err] npm ERR! errno 1 2021-03-30T20:14:46.839Z [err] npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build 2021-03-30T20:14:46.840Z [err] npm ERR! Exit status 1 2021-03-30T20:14:46.840Z [err] npm ERR! 2021-03-30T20:14:46.840Z [err] npm ERR! Failed at the [email protected] install script. 2021-03-30T20:14:46.840Z [err] npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2021-03-30T20:14:46.883Z [err] 2021-03-30T20:14:46.883Z [err] npm ERR! A complete log of this run can be found in: 2021-03-30T20:14:46.883Z [err] npm ERR! /root/.npm/_logs/2021-03-30T20_14_46_874Z-debug.log 2021-03-30T20:14:46.897Z rc=1

xrvm63 avatar Mar 30 '21 20:03 xrvm63

Successfully installed manually in package.json only this version:

"dependencies": {
    "node-red-contrib-chatbot": "0.9.4",

Update to 0.19.7 also failed with same errors in both ways (palette and manually).

xrvm63 avatar Mar 30 '21 21:03 xrvm63

Hello @xrvm63;

I had the same issue and i finally managed to make it work.

What i did :

in the configuration tab :

system_packages:
  - make
  - gcc
  - g++
npm_packages:
  - os-homedir
  - minipass
  - minizlib
  - fs-minipass
init_commands:
  - ln -s /usr/bin/python3 /usr/bin/python

Then in packages.json inside the node-red folder :

{
    "name": "node-red-project",
    "description": "A Node-RED Project",
    "version": "0.0.1",
    "private": true,
    "dependencies": {
        "node-red-contrib-chatbot": "~0.19.7"
    }
}

I think it should work to via the palette.

The main issue was that the hassio image is not provided with any build tools ( make , gcc ... )

Then the second issue is that the script is targeting python but only python3 is installed, the symlink did the trick.

It's not the cleanest solution but it works.

image

Cheers.

P4uLT avatar Apr 04 '21 21:04 P4uLT

In addition, if you use the Alexa endpoint, it will be served on http://[IP]:1880/endpoint/redbot/alexa and URI for testing will be http://[IP]:1880/endpoint/redbot/alexa

P4uLT avatar Apr 05 '21 12:04 P4uLT

What i did :

> in the configuration tab :

system_packages:
  - make
  - gcc
  - g++
npm_packages:
  - os-homedir
  - minipass
  - minizlib
  - fs-minipass
init_commands:
  - ln -s /usr/bin/python3 /usr/bin/python

Sorry for the basic question... @P4uLT "configuration Tab" where? Thank you!

facaldoggi avatar May 14 '21 15:05 facaldoggi

What i did :

> in the configuration tab :

system_packages:
  - make
  - gcc
  - g++
npm_packages:
  - os-homedir
  - minipass
  - minizlib
  - fs-minipass
init_commands:
  - ln -s /usr/bin/python3 /usr/bin/python

Sorry for the basic question... @P4uLT "configuration Tab" where? Thank you!

Man, I was wondering the same and then googled a little and found out the answer... you need to go to Home Assistant's Supervisor sub menu, then click the NodeRed add on and there, in the top of the screen, you will see the configuration tab

image

knifesk avatar Jun 04 '21 18:06 knifesk

I confirm that the solution works.

Note that the Configuration Tab mentionned is the Configuration tab of the add-on.

I don't know why the add-on accepted the installation several months ago without this trick and was not able to work and to update the nodes now. But know it was able to install the Chatbot nodes. I Will chek whether it works or not.

JeeKaheL avatar Jun 05 '22 06:06 JeeKaheL

I have attempted the above, but seem to get stuck in a node-red boot loop trying to fetch and install packages. Any ideas?

smcnab1 avatar Sep 23 '22 17:09 smcnab1

This is my current config and is still working after several HA and NodeRed updates

image

knifesk avatar Sep 24 '22 13:09 knifesk