question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgraded to node v8.9.0 from v6.10.2, homebridge wont' start

See original GitHub issue

Was running homebridge successfully using node v6.10.2. I upgraded to 8.9.0 by doing the following. nvm install 8 nvm reinstall-packages 6.10.2 nvm use 8 npm uninstall -g homebridge npm install -g homebridge

Then i manually started homebrigde sudo -u homebridge /home/pi/.nvm/versions/node/v8.9.0/bin/homebridge -U /var/homebridge/

received that error that i paste below.

I tried npm rebuild and receive the same error when trying to start. i’ve tried npm uninstall of all my homebridge plugins and re-installed them all. Same error. I can’t seem to figure this out! Any ideas would be appreciated.

Expected Behavior

Expecting homebridge to start without error

Current Behavior

receive error pasted below.

Steps to Reproduce (for bugs)

Versions

  • Homebridge: homebridge --version v0.4.31
  • Node: node --version v8.9.0
  • OS: pi3

Configuration


Homebridge Log / Command Output

/home/pi/.nvm/versions/node/v8.9.0/lib/node_modules/homebridge/node_modules/mdns/lib/dns_sd.js:35
    throw ex;
    ^

Error: Module version mismatch. Expected 48, got 57.
    at Error (native)
    at Object.Module._extensions..node (module.js:597:18)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/pi/.nvm/versions/node/v8.9.0/lib/node_modules/homebridge/node_modules/mdns/lib/dns_sd.js:24:20)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
tomsteenbakkerscommented, Nov 4, 2017

I had the same issue. Try this, it’s solved my problems

sudo npm install --unsafe-perm mdns 
cd /usr/local/lib/node_modules/homebridge
sudo npm rebuild --unsafe-perm
0reactions
openfirmwarecommented, Aug 9, 2018

I had this too with nvm, where I had node 10 as default although I am using node 8 for homebridge. My systemd script to start homebridge using a bash login shell would load node 10 and try to run the homebridge from node 8, and it would have the version mismatch error. Setting node 8 as my default fixed it, although I think updating the systemd script to switch node version should also work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgraded to node v8.9.0 from v6.10.2, homebridge wont' start
Was running homebridge successfully using node v6.10.2. I upgraded to 8.9.0 by doing the following. nvm install 8
Read more >
How can I fix error loading Nest plugin on Homebridge?
Plugin /usr/local/lib/node_modules/homebridge-nest requires Node version of >=7.0.0 which does not satisfy the current Node version of v6.10.2.
Read more >
Homekit and Synology Chroot - General Dev Discussions
Try going in the DSM GUI and opening Chroot GUI and under service tab, add service with /root/.homebridge/run.sh as the launch command, then ......
Read more >
Download & Update Node.js to the Latest Version! Node v19 ...
Direct download links to update to the latest Node.js versions: Node v19.0.0 / LTS v16.18.0.
Read more >
Homebridge Jail | TrueNAS Community
okay an update. ... to start Homebridge and let it run as a daemon. ... "-g" "homebridge" npm ERR! node v6.2.1 npm ERR!...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found