hannseman / homebridge-mi-hygrothermograph

Homebridge plugin for the Xiaomi Mi Bluetooth Temperature and Humidity Sensor
MIT License
264 stars 52 forks source link

Error after update RBP / Homebridge / NPM #162

Closed petrocino closed 2 years ago

petrocino commented 2 years ago

After update my system, the only plugin reporting error was the mi-higrothermograph. Can you please tell me if there's a workaround to get it fixed?

Raspberry Pi 4 Linux raspberrypi 5.10.63-v7l+

Homebridge version: 1.3.5 homebridge-mi-hygrothermograph v3.1.0

Node.js Version - v16.13.0 NPM version - v7.20.0

Error log:

[10/31/2021, 11:29:49 AM] ====================
[10/31/2021, 11:29:49 AM] ERROR INITIALIZING PLUGIN homebridge-mi-hygrothermograph:
[10/31/2021, 11:29:49 AM] Error: The module '/usr/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 83. This version of Node.js requires
NODE_MODULE_VERSION 93. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1183:18)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/bluetooth-hci-socket/lib/native.js:6:15)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
kalety commented 2 years ago

Me too!

hannseman commented 2 years ago

You need to reinstall this plugin as it was compiled against an older node version. See https://github.com/hannseman/homebridge-mi-hygrothermograph/issues/124