maxwellhadley / node-red-contrib-rfxcom

node-RED nodes to access an RFXtrx433 transceiver
BSD 2-Clause "Simplified" License
22 stars 13 forks source link

Cant install 2.9.1 on Node-red 1.0.3 (hassos_rpi3-3.9.img) #90

Closed UIC closed 4 years ago

UIC commented 4 years ago

Hello When I try to install, I get an error message below. I have tried to reinstall Node-Red (also deleted the node-red directory under / config).


2020-02-13T15:45:51.826Z Install : node-red-contrib-rfxcom 2.9.1

2020-02-13T15:45:52.385Z npm install --no-audit --no-update-notifier --save --save-prefix="~" --production node-red-contrib-rfxcom@2.9.1 2020-02-13T15:46:05.598Z [out] 2020-02-13T15:46:05.598Z [out] > @serialport/bindings@8.0.7 install /config/node-red/node_modules/@serialport/bindings 2020-02-13T15:46:05.598Z [out] > prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild 2020-02-13T15:46:05.598Z [out] 2020-02-13T15:46:07.027Z [err] prebuild-install 2020-02-13T15:46:07.028Z [err] WARN 2020-02-13T15:46:07.028Z [err] install No prebuilt binaries found (target=12.14.0 runtime=node arch=arm libc=musl platform=linux) 2020-02-13T15:46:09.421Z [err] gyp 2020-02-13T15:46:09.423Z [err]
2020-02-13T15:46:09.423Z [err] ERR! build error 2020-02-13T15:46:09.423Z [err]
2020-02-13T15:46:09.426Z [err] gyp 2020-02-13T15:46:09.427Z [err] ERR! 2020-02-13T15:46:09.427Z [err]
2020-02-13T15:46:09.427Z [err] stack 2020-02-13T15:46:09.427Z [err] Error: not found: make 2020-02-13T15:46:09.428Z [err] gyp 2020-02-13T15:46:09.428Z [err] ERR! 2020-02-13T15:46:09.428Z [err] stack 2020-02-13T15:46:09.428Z [err] at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12) 2020-02-13T15:46:09.428Z [err] gyp 2020-02-13T15:46:09.428Z [err] ERR! 2020-02-13T15:46:09.429Z [err]
2020-02-13T15:46:09.429Z [err] stack 2020-02-13T15:46:09.429Z [err] at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19) 2020-02-13T15:46:09.429Z [err] gyp 2020-02-13T15:46:09.429Z [err]
2020-02-13T15:46:09.429Z [err] ERR! 2020-02-13T15:46:09.430Z [err] stack 2020-02-13T15:46:09.430Z [err] at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29) 2020-02-13T15:46:09.430Z [err] gyp 2020-02-13T15:46:09.430Z [err] ERR! 2020-02-13T15:46:09.430Z [err]
2020-02-13T15:46:09.430Z [err] stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16 2020-02-13T15:46:09.430Z [err] gyp 2020-02-13T15:46:09.431Z [err] ERR! 2020-02-13T15:46:09.431Z [err] stack 2020-02-13T15:46:09.431Z [err] at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5 2020-02-13T15:46:09.431Z [err] gyp 2020-02-13T15:46:09.431Z [err] ERR! 2020-02-13T15:46:09.431Z [err] stack 2020-02-13T15:46:09.431Z [err] at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5 2020-02-13T15:46:09.432Z [err] gyp 2020-02-13T15:46:09.432Z [err] ERR! 2020-02-13T15:46:09.432Z [err] stack 2020-02-13T15:46:09.432Z [err] at FSReqCallback.oncomplete (fs.js:158:21) 2020-02-13T15:46:09.433Z [err] gyp 2020-02-13T15:46:09.433Z [err] ERR! 2020-02-13T15:46:09.433Z [err] System Linux 4.19.93-v7 2020-02-13T15:46:09.434Z [err] gyp 2020-02-13T15:46:09.434Z [err] ERR! 2020-02-13T15:46:09.434Z [err] command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 2020-02-13T15:46:09.435Z [err] gyp 2020-02-13T15:46:09.435Z [err] ERR! 2020-02-13T15:46:09.435Z [err] cwd /config/node-red/node_modules/@serialport/bindings 2020-02-13T15:46:09.435Z [err] gyp 2020-02-13T15:46:09.435Z [err] ERR! 2020-02-13T15:46:09.435Z [err]
2020-02-13T15:46:09.436Z [err] node -v v12.14.0 2020-02-13T15:46:09.436Z [err] gyp 2020-02-13T15:46:09.436Z [err] ERR! 2020-02-13T15:46:09.436Z [err] node-gyp -v 2020-02-13T15:46:09.436Z [err] v5.0.5 2020-02-13T15:46:09.436Z [err] gyp 2020-02-13T15:46:09.437Z [err] ERR! 2020-02-13T15:46:09.437Z [err] not ok 2020-02-13T15:46:09.437Z [err]
2020-02-13T15:46:10.376Z [err] npm 2020-02-13T15:46:10.377Z [err]
2020-02-13T15:46:10.378Z [err] ERR! 2020-02-13T15:46:10.379Z [err]
2020-02-13T15:46:10.380Z [err] code 2020-02-13T15:46:10.380Z [err] ELIFECYCLE 2020-02-13T15:46:10.381Z [err] npm 2020-02-13T15:46:10.382Z [err]
2020-02-13T15:46:10.382Z [err] ERR! 2020-02-13T15:46:10.382Z [err]
2020-02-13T15:46:10.382Z [err] errno 2020-02-13T15:46:10.383Z [err] 1 2020-02-13T15:46:10.388Z [err] npm 2020-02-13T15:46:10.389Z [err]
2020-02-13T15:46:10.389Z [err] ERR! 2020-02-13T15:46:10.389Z [err] @serialport/bindings@8.0.7 install: prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild 2020-02-13T15:46:10.390Z [err] npm 2020-02-13T15:46:10.390Z [err]
2020-02-13T15:46:10.390Z [err] ERR! 2020-02-13T15:46:10.391Z [err] Exit status 1 2020-02-13T15:46:10.391Z [err] npm 2020-02-13T15:46:10.391Z [err]
2020-02-13T15:46:10.392Z [err] ERR! 2020-02-13T15:46:10.392Z [err]
2020-02-13T15:46:10.392Z [err] npm 2020-02-13T15:46:10.393Z [err]
2020-02-13T15:46:10.393Z [err] ERR! 2020-02-13T15:46:10.393Z [err] Failed at the @serialport/bindings@8.0.7 install script. 2020-02-13T15:46:10.394Z [err] npm 2020-02-13T15:46:10.394Z [err]
2020-02-13T15:46:10.395Z [err] ERR! 2020-02-13T15:46:10.395Z [err] This is probably not a problem with npm. There is likely additional logging output above. 2020-02-13T15:46:10.458Z [err] 2020-02-13T15:46:10.458Z [err] npm ERR! A complete log of this run can be found in: 2020-02-13T15:46:10.458Z [err] npm 2020-02-13T15:46:10.458Z [err] ERR! /root/.npm/_logs/2020-02-13T15_46_10_431Z-debug.log 2020-02-13T15:46:10.478Z rc=1

It seems there is a problem with the serial port. How can I get past and install the nodes?

regards /Håkan

maxwellhadley commented 4 years ago

The error arises because there is no pre-built binary for serialport, and your system does not have the build tools needed to compile it installed. Are you using Alpine Linux? If so, please see the notes here: https://serialport.io/docs/guide-installation#alpine-linux

UIC commented 4 years ago

I can confirm that I have an alpine installation. The first two commands you talked about went well, but the last one gave:

$ npm install serialport --build-from-source $ bash: npm: command not found

npm does not seem to exist but is used by the installation script ??? Do I need to reinstall npm?

Regards Håkan

(My system is an installation of Hass.IO image on a RaspberryPi 3.)

maxwellhadley commented 4 years ago

You should have (re) installed npm by default when you added the nodejs package. What do the commands which node and which npm return when entered at the bash prompt?

UIC commented 4 years ago

I followed the instructions in this link: https://github.com/hassio-addons/addon-node-red/issues/198#issuecomment-487588836 and it started to work. Why is a bit of a mystery to me. Adds the link here for reference for others with the same problem. Regards Håkan