"Try re-compiling"

Posted on
Sat Jun 24, 2017 7:44 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

"Try re-compiling"

All was working fine for weeks, but I had to restart for unrelated reasons. Now:
Code: Select all
/opt/local/lib/node_modules/homebridge/node_modules/mdns/lib/dns_sd.js:35
    throw ex;
    ^

Error: The module '/opt/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 48. This version of Node.js requires
NODE_MODULE_VERSION 51. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or`npm install`).
    at Object.Module._extensions..node (module.js:598:18)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/opt/local/lib/node_modules/homebridge/node_modules/mdns/lib/dns_sd.js:24:20)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)


I wonder if someone who knows what's up with npm could point to some sort of an article regarding best practices for keeping this from happening--or even marginal practices to enable the unwashed to keep homeBridge running when NODE_WHATSIS_VERSION ∞ changes to VERSION ∞.1

Because now I've tried "npm install homebridge" and "npm install homebridge-indigo" and "npm rebuild homebridge" and "npm rebuild homebridge-indigo" and "npm rebuild" and the Home app still says "65 accessories not responding."

Along the way I get a nice peppering of
Code: Select all
npm WARN enoent ENOENT: no such file or directory, open '/Users/mike/package.json'
npm WARN mike No description
npm WARN mike No repository field.
npm WARN mike No README data
npm WARN mike No license field.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Sat Jun 24, 2017 9:21 pm
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: "Try re-compiling"

You will need to uninstall node and reinstall. I don't know which version of node you have installed originally, but the instructions for moving from node4 to node6 are here: viewtopic.php?f=191&t=16904

You can adjust based on whatever version you have installed (port installed will list everything that is currently installed.)

Posted on
Sun Jun 25, 2017 12:31 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: "Try re-compiling"

Thanks. Could have sworn I updated already, but maybe not.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Sun Jun 25, 2017 12:40 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: "Try re-compiling"

Just went through this update again (confirming from the thread you linked that I did in fact go through it before, and I ended with the same homebridge.log error again. After the whole
Code: Select all
sudo port uninstall npm2
sudo port uninstall nodejs4
sudo rm -fr /opt/local/lib/node_modules/
sudo port install nodejs6
sudo port install npm3
sudo npm install -g homebridge
sudo npm install -g homebridge-indigo
process, which happened with no fuss aside from some warnings about running port selfupdate.

And yes, I quit and restarted home bridge.

Edit: Looks like the problem is either something with not having run port selfupdate, which I now have done, or it is with my launchctl implementation. When I run homeBridge from the terminal, all is fine. The odd thing is that when I use
Code: Select all
launchctl load -w ~/Library/LaunchAgents/com.webdeck.homebridge.plist
I can then see home bridge in the activity monitor, but the log gets that error and nothing shows up in the Home app.

Just confirmed this. How can the launchctl load -w ~/Library/LaunchAgents/com.webdeck.homebridge.plist command be pointing to something different from running homebridge -D?

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests