homebridge-xiaomi-roborock-vacuum: Error loading the plugin after updating to v0.26.0

@afharo thank you for implementing the dust bin that fast! You’re on fire! Sadly it now throws an error at me:

[9/1/2022, 7:01:35 AM] ====================
[9/1/2022, 7:01:35 AM] ERROR LOADING PLUGIN homebridge-xiaomi-roborock-vacuum:
[9/1/2022, 7:01:35 AM] Error: Cannot find module 'hap-nodejs'
Require stack:
- /homebridge/node_modules/homebridge-xiaomi-roborock-vacuum/dist/services/custom_care_service/care_service.js
- /homebridge/node_modules/homebridge-xiaomi-roborock-vacuum/dist/services/custom_care_service/index.js
- /homebridge/node_modules/homebridge-xiaomi-roborock-vacuum/dist/services/care_service.js
- /homebridge/node_modules/homebridge-xiaomi-roborock-vacuum/dist/services/index.js
- /homebridge/node_modules/homebridge-xiaomi-roborock-vacuum/dist/xiaomi_roborock_vacuum_accessory.js
- /homebridge/node_modules/homebridge-xiaomi-roborock-vacuum/dist/index.js
- /homebridge/node_modules/homebridge/lib/plugin.js
- /homebridge/node_modules/homebridge/lib/pluginManager.js
- /homebridge/node_modules/homebridge/lib/server.js
- /homebridge/node_modules/homebridge/lib/cli.js
- /homebridge/node_modules/homebridge/bin/homebridge
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/homebridge/node_modules/homebridge-xiaomi-roborock-vacuum/src/services/custom_care_service/care_service.ts:1:1)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    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)
[9/1/2022, 7:01:35 AM] ====================

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 15 (7 by maintainers)

Most upvoted comments

0.24.1 is back working for me.

@weissshay, glad to know that the fix worked!

Thank you for the heads up on the new warning! I’ll reach out to the homebridge folks to figure out how to solve it. FWIW, the need for the hap-nodejs dependency is for the legacy care indicators. I may remove them in future versions 😃

You truly are on fire! 🔥 😆

Thank you for the heads up! I’ll submit a fix in a bit. I’ll update when the fix is published.