hbblebc / homebridge-bed-control

Homebridge plugin to control compatible smart beds
Apache License 2.0
7 stars 1 forks source link

plug-in will not load on docker-homebridge, wrong path to dependency. #1

Closed traviswparker closed 1 year ago

traviswparker commented 1 year ago

Plug-in fails to load on docker-homebridge (HB 1.5.0) with

[9/8/2022, 1:27:16 AM] ====================
[9/8/2022, 1:27:16 AM] ERROR LOADING PLUGIN homebridge-bed-control:
[9/8/2022, 1:27:16 AM] Error: Cannot find module 'hap-nodejs/dist/lib/definitions'
Require stack:
- /homebridge/node_modules/homebridge-bed-control/dist/bedAccessory.js

The container runs HB with extra flags: -P /var/lib/homebridge/node_modules --strict-plugin-resolution so the correct path to hap-nodejs is homebridge/node_modules/hap-nodejs

Prepending homebridge/node_modules/ in line 4 of bedAccessory.js allows the plug-in to run.

hbblebc commented 1 year ago

Thanks, I think it should be fixed now.