Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Request: I can't upgrade or install Switchbot homebridge plugin. #725

Closed
mkizzle2906 opened this issue Apr 17, 2023 · 3 comments
Closed
Assignees
Labels
question Further information is requested

Comments

@mkizzle2906
Copy link

Describe Your Problem

I can't upgrade or install Switchbot homebridge plugin.

Relevant log output

(##################) ⠙ reify:googleapis: timing reifyNode:node_modules/@switchbot/home
> @abandonware/bluetooth-hci-socket@0.5.3-10 install
> node-pre-gyp install --fallback-to-build --update-binary

node-pre-gyp ERR! install response status 404 Not Found on https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-10/bluetooth_hci_socket-0.5.3-10-node-v108-linux-arm.tar.gz 
make: Entering directory '/usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'
  CXX(target) Release/obj.target/bluetooth_hci_socket/src/BluetoothHciSocket.o
make: g++: No such file or directorypis: timing reifyNode:node_modules/@switchbot/home
make: *** [bluetooth_hci_socket.target.mk:111: Release/obj.target/bluetooth_hci_socket/src/BluetoothHciSocket.o] Error 127
make: Leaving directory '/usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 5.10.103-v7l+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--update-binary" "--module=/usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node" "--module_name=bluetooth_hci_socket" "--module_path=/usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/lib/binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108"
gyp ERR! cwd /usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket
gyp ERR! node -v v18.15.0
gyp ERR! node-gyp -v v9.3.1
gyp ERR! not ok 
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 build --fallback-to-build --update-binary --module=/usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node --module_name=bluetooth_hci_socket --module_path=/usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
node-pre-gyp ERR! System Linux 5.10.103-v7l+
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--update-binary"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket
node-pre-gyp ERR! node -v v18.15.0
node-pre-gyp ERR! node-pre-gyp -v v1.0.10
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 build --fallback-to-build --update-binary --module=/usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node --module_name=bluetooth_hci_socket --module_path=/usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)

> @abandonware/noble@1.9.2-20 install
> node-gyp-build

make: Entering directory '/usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble/build'
  SOLINK_MODULE(target) Release/obj.target/noble.nodeNode:node_modules/@switchbot/home
make: g++: No such file or directory
make: *** [noble.target.mk:20: Release/obj.target/noble.node] Error 127
make: Leaving directory '/usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 5.10.103-v7l+
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/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble
gyp ERR! node -v v18.15.0
gyp ERR! node-gyp -v v9.3.1
gyp ERR! not ok 
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble
npm ERR! command failed
npm ERR! command sh -c node-gyp-build

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2023-04-17T13_00_57_534Z-debug-0.log

Operation failed. Please review log for details.

Config for homebridge-switchbot

No response

Screenshots

No response

Device & Model

Raspberry Pi 4

Node.js Version

v18.15.0

NPM Version

9.5.0

Homebridge Version

v1.6.0

Homebridge SwitchBot Plugin Version

v2.6.2

Homebridge Config UI X Plugin Version

No response

Operating System

Raspian

@marvinjoa
Copy link

marvinjoa commented Apr 17, 2023

Fix: #691 (comment)

In your case, installing just the hci-socket manually mentioned in the fix won't work, you also need to install noble manually based on your error log.

So:
npm i @abandonware/bluetooth-hci-socket
npm i @abandonware/noble

@donavanbecker donavanbecker closed this as not planned Won't fix, can't repro, duplicate, stale Apr 17, 2023
@mkizzle2906
Copy link
Author

'/usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'
  CXX(target) Release/obj.target/bluetooth_hci_socket/src/BluetoothHciSocket.o

it doesn't work for me. I can't install them by pasting your command...

@marvinjoa
Copy link

marvinjoa commented Apr 17, 2023

```shell
'/usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'
  CXX(target) Release/obj.target/bluetooth_hci_socket/src/BluetoothHciSocket.o

it doesn't work for me. I can't install them by pasting your command...

Did you do it in the hb-shell?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

7 participants