node-gyp icon indicating copy to clipboard operation
node-gyp copied to clipboard

Error with install Homebridge plugin

Open ninetown opened this issue 6 years ago • 2 comments

Hello! Trying to install Homebridge plugin form https://github.com/hannseman/homebridge-mi-hygrothermograph and I got same error every time listed below. Thanks!

  • Node Version: v12.17.0
  • Platform: Linux raspberrypi 4.19.118+ #1311 Mon Apr 27 14:16:15 BST 2020 armv6l GNU/Linux
  • Compiler: Raspberry Pi Zero W
  • Module: https://github.com/hannseman/homebridge-mi-hygrothermograph
root@raspberrypi:/home/pi# sudo npm install -g --unsafe-perm homebridge-mi-hygrothermograph

> [email protected] install /usr/local/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/usb
> prebuild-install --verbose || node-gyp rebuild

prebuild-install info begin Prebuild-install version 5.3.4
prebuild-install info looking for cached prebuild @ /root/.npm/_prebuilds/470134-usb-v1.6.3-node-v72-linux-arm.tar.gz
prebuild-install http request GET https://github.com/tessel/node-usb/releases/download/v1.6.3/usb-v1.6.3-node-v72-linux-arm.tar.gz
prebuild-install http 404 https://github.com/tessel/node-usb/releases/download/v1.6.3/usb-v1.6.3-node-v72-linux-arm.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=12.17.0 runtime=node arch=arm libc= platform=linux)
gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack TypeError: tar.extract is not a function
gyp ERR! stack     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:199:22)
gyp ERR! stack     at Request.emit (events.js:327:22)
gyp ERR! stack     at Request.onRequestResponse (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1066:10)
gyp ERR! stack     at ClientRequest.emit (events.js:315:20)
gyp ERR! stack     at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:596:27)
gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:469:22)
gyp ERR! stack     at TLSSocket.emit (events.js:315:20)
gyp ERR! stack     at addChunk (_stream_readable.js:295:12)
gyp ERR! stack     at readableAddChunk (_stream_readable.js:271:9)
gyp ERR! System Linux 4.19.118+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/usb
gyp ERR! node -v v12.17.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>

> @abandonware/[email protected] install /usr/local/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/bluetooth-hci-socket
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-5/binding-0.5.3-5-node-v72-linux-arm.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for @abandonware/[email protected] and [email protected] (node-v72 ABI, glibc) (falling back to source compile with node-gyp) 
gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack TypeError: tar.extract is not a function
gyp ERR! stack     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:199:22)
gyp ERR! stack     at Request.emit (events.js:327:22)
gyp ERR! stack     at Request.onRequestResponse (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1066:10)
gyp ERR! stack     at ClientRequest.emit (events.js:315:20)
gyp ERR! stack     at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:596:27)
gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:469:22)
gyp ERR! stack     at TLSSocket.emit (events.js:315:20)
gyp ERR! stack     at addChunk (_stream_readable.js:295:12)
gyp ERR! stack     at readableAddChunk (_stream_readable.js:271:9)
gyp ERR! System Linux 4.19.118+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/binding.node" "--module_name=binding" "--module_path=/usr/local/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/bluetooth-hci-socket/lib/binding" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/bluetooth-hci-socket
gyp ERR! node -v v12.17.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/binding.node --module_name=binding --module_path=/usr/local/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/bluetooth-hci-socket/lib/binding --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (7)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Linux 4.19.118+
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/bluetooth-hci-socket
node-pre-gyp ERR! node -v v12.17.0
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/binding.node --module_name=binding --module_path=/usr/local/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/bluetooth-hci-socket/lib/binding --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (7)

> @abandonware/[email protected] install /usr/local/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/noble
> node-gyp rebuild

gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack TypeError: tar.extract is not a function
gyp ERR! stack     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:199:22)
gyp ERR! stack     at Request.emit (events.js:327:22)
gyp ERR! stack     at Request.onRequestResponse (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1066:10)
gyp ERR! stack     at ClientRequest.emit (events.js:315:20)
gyp ERR! stack     at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:596:27)
gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:469:22)
gyp ERR! stack     at TLSSocket.emit (events.js:315:20)
gyp ERR! stack     at addChunk (_stream_readable.js:295:12)
gyp ERR! stack     at readableAddChunk (_stream_readable.js:271:9)
gyp ERR! System Linux 4.19.118+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/noble
gyp ERR! node -v v12.17.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/homebridge-mi-hygrothermograph/node_modules/usb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `prebuild-install --verbose || node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 7
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/[email protected] (node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/bluetooth-hci-socket):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/[email protected] install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! @abandonware/[email protected] install: `node-gyp rebuild`
npm ERR! Exit status 7
npm ERR! 
npm ERR! Failed at the @abandonware/[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/2020-06-05T12_29_35_970Z-debug.log
root@raspberrypi:/home/pi# 

ninetown avatar Jun 05 '20 12:06 ninetown

try to Downgrade node

1 - Install node version manager: sudo npm install -g n

Downgrade node to v 8.9.0 by:

sudo n 8.9.0 then

sudo npm install bluetooth-hci-socket --unsafe-perm

farouk-lilou avatar Sep 03 '20 20:09 farouk-lilou

Is this issue solved?

owl-from-hogvarts avatar Jun 17 '21 10:06 owl-from-hogvarts