Wrong node version
See original GitHub issueI get this error as soon as I try to run homebridge. I tried to reinstall both dns and homebridge using “npm install -g” but that didn’t make a difference:
/usr/local/lib/node_modules/homebridge/node_modules/mdns/lib/dns_sd.js:35 throw ex; ^
Error: The module ‘/usr/local/lib/node_modules/homebridge/node_modules/mdns/build/Release/dns_sd_bindings.node’
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 59. Please try re-compiling or re-installing
the module (for instance, using npm rebuild
or npm install
).
at Object.Module._extensions…node (module.js:689:18)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/mdns/lib/dns_sd.js:24:20)
at Module._compile (module.js:660:30)
at Object.Module._extensions…js (module.js:671:10)
at Module.load (module.js:573:32)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:10 (1 by maintainers)
Top GitHub Comments
In my experience, you need to
npm -g uninstall homebridge
explicitly before re-installing it, to force re-compilation of the mdns module. This is needed every time you change NodeJS to a different major version.This issue has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this issue was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.