gismo141 / homebridge-server

Server plugin for homebridge
https://gismo141.github.io/configure-your-homebridge-2/
152 stars 20 forks source link

Installing Error #54

Closed Roelof626 closed 5 years ago

Roelof626 commented 6 years ago

When i'm trying to install the homebridge-server plugin on my Homebridge (macOS 10.13.2) with the command "sudo npm install homebridge-server@latest -g" (without quotes of course) the Terminal gives me an error (See screenshot). Even if i try without the "Sudo" flag in the command.

schermafbeelding 2018-01-01 om 15 25 27

For people who are curious about the log output: here it is >

2018-01-01T14_21_55_591Z-debug.log

Can anybody help me with this error so i can run the plugin? Thnx anyway!

gismo141 commented 6 years ago

The issues seems to be related to the installation of mdns under macOS which is needed for homebridge itself and not for the plugin.

There is also an issue on the projects site so I propose to follow that one as well.

https://github.com/agnat/node_mdns/issues/206

mrtekkid commented 6 years ago

eI am getting the same error message on Ubuntu as well when trying to install.

I cannot remove the suggested folder in the document you provided due to "permission denied" when trying to add to trash.

gismo141 commented 6 years ago

You might have to prepend sudo or log in as an administrator to remove the folder.

mrtekkid commented 6 years ago

Didn't work.

Deleted that build folder. Homebridge won't launch at all now. Went from functioning home bridge with one faulty plugin to non-functioning home bridge due to faulty plugin.

Thank god its in a VM thats backed up.

Any idea?

gismo141 commented 6 years ago

Okay that’s completely strange. The problem that was mentioned in the first post isn’t related to the server plugin but to mdns.

That mdns however is needed for homebridge itself so something must have happened in between. What version of node are you using?

Could you please post the error message that shows up when launching homebridge?

mrtekkid commented 6 years ago

Yeah, i thought so too. The error I had exactly matched the first one, which also matches the one in the linked article. When I 'sudo'ed out the suggested folder in that document after being initially denied, that's when the error happens. Ironically, the folder thats deleted isn't re-created either.

When launching home bridge now,...

`**homebridge@homebridge-VirtualBox:~$ homebridge module.js:559 throw err; ^

Error: Cannot find module '../build/Release/dns_sd_bindings' at Function.Module._resolveFilename (module.js:557:15) at Function.Module._load (module.js:484:25) at Module.require (module.js:606:17) at require (internal/module.js:11:18) at Object. (/usr/local/lib/node_modules/homebridge/node_modules/mdns/lib/dns_sd.js:32:22) at Module._compile (module.js:662:30) at Object.Module._extensions..js (module.js:673:10) at Module.load (module.js:575:32) at tryModuleLoad (module.js:515:12) at Function.Module._load (module.js:507:3)** `

gismo141 commented 6 years ago

Okay the build folder that you've deleted must be recreated. So first uninstall homebridge and its dependencies, then delete the build folder if it hasn't been already and then reinstall everything. As I can see you're using virtualbox. What kind of VM are you using? 32 or 64 Bit?

Skull09rus commented 6 years ago

@gismo141 Hi! Have same problem, need help)

sudo npm install homebridge-server@latest -g

mdns@2.3.4 install /usr/local/lib/node_modules/homebridge-server/node_modules/mdns node-gyp rebuild

gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/homebridge-server/node_modules/mdns/build' gyp ERR! System Darwin 17.5.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/homebridge-server/node_modules/mdns gyp ERR! node -v v9.7.1 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! mdns@2.3.4 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the mdns@2.3.4 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! /Users/ilyabondin/.npm/_logs/2018-03-17T10_46_23_178Z-debug.log

sagitt commented 6 years ago

same problem

gismo141 commented 5 years ago

The problem is not reproducible in the latest version of MacOS 10.14.2 and npm 6.5.0. Closing due to inactivity.