Homebridge: new NodeJS and npm versions

Created on 31 May 2017  路  6Comments  路  Source: homebridge/homebridge

Hi.

Just got updated to new Node.Js and NPM versions and Homebrigde refuses to lunch

0|homebrid | Error: The module '/usr/lib/node_modules/homebridge/node_modules/mdns/build/Release/dns_sd_bindings.node'
0|homebrid | was compiled against a different Node.js version using
0|homebrid | NODE_MODULE_VERSION 51. This version of Node.js requires
0|homebrid | NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
0|homebrid | the module (for instance, using npm rebuild or npm install).
0|homebrid | at Object.Module._extensions..node (module.js:598:18)
0|homebrid | at Module.load (module.js:503:32)
0|homebrid | at tryModuleLoad (module.js:466:12)
0|homebrid | at Function.Module._load (module.js:458:3)
0|homebrid | at Module.require (module.js:513:17)
0|homebrid | at require (internal/module.js:11:18)
0|homebrid | at Object. 0|homebrid | at Module._compile (module.js:569:30)
0|homebrid | at Object.Module._extensions..js (module.js:580:10)
0|homebrid | at Module.load (module.js:503:32)

$ node -v
v8.0.0
$ npm -v
5.0.0

Seems we might need to get some update.

Regards,
Miguel

stale

Most helpful comment

ERROR

/usr/lib/node_modules/homebridge/node_modules/mdns/lib/dns_sd.js:35
    throw ex;
    ^

Error: The module '/usr/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 48. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).

FIX (DOCUMENTATION)

npm uninstall homebrigde -g
rm -Rf /usr/lib/node_modules/homebridge/
npm install homebridge -g --unsafe-perm

Works for me.

All 6 comments

That is a cached compiled version, which was compiled before you upgraded. There are some tickets here that had the same issue with older node versions, use the search to learn how to re-compile the dependencies of homebridge.

Thanks Snowdd1

I just sudo unistall homebrige....

sudo npm uninsstall homebrigde -g

and reinstall again

sudo npm install -g --unsafe-perm homebridge

this fixed the issue!!!!

thanks for the tip

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.

ERROR

/usr/lib/node_modules/homebridge/node_modules/mdns/lib/dns_sd.js:35
    throw ex;
    ^

Error: The module '/usr/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 48. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).

FIX (DOCUMENTATION)

npm uninstall homebrigde -g
rm -Rf /usr/lib/node_modules/homebridge/
npm install homebridge -g --unsafe-perm

Works for me.

FIX (DOCUMENTATION)

npm uninstall homebrigde -g
rm -Rf /usr/lib/node_modules/homebridge/
npm install homebridge -g --unsafe-perm

Would doing this require to reconfigure homebridge or does everything com back how it was?

this is happening now after upgrading to fedora 29. following established remedy produces this error:

npm install homebridge -g --unsafe-perm
/usr/bin/homebridge -> /usr/lib/node_modules/homebridge/bin/homebridge

[email protected] install /usr/lib/node_modules/homebridge/node_modules/curve25519-n
node-gyp rebuild

sh: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin/node-gyp: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-11-18T00_53_47_877Z-debug.log

what now? worked fine under fedora 28. originally installed under fedora 27.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

junior466 picture junior466  路  4Comments

JangoBritt picture JangoBritt  路  3Comments

coneybeare picture coneybeare  路  4Comments

robertcedwards picture robertcedwards  路  6Comments

StefanMeGit picture StefanMeGit  路  4Comments