HomeBridgeController icon indicating copy to clipboard operation
HomeBridgeController copied to clipboard

After update and subsequent rollback I can't launch hombridge with controller installed.

Open drgonz0 opened this issue 8 years ago • 17 comments

I get this when HomeBridgeControllerLink is enabled. This had worked previously.

path.js:8 throw new TypeError('Path must be a string. Received ' + ^

TypeError: Path must be a string. Received undefined at assertPath (path.js:8:11) at Object.posix.resolve (path.js:426:5) at Conf.loadPrefix (/usr/local/lib/node_modules/homebridge-controllerlink/node_modules/npm/lib/config/load-prefix.js:43:14) at load_ (/usr/local/lib/node_modules/homebridge-controllerlink/node_modules/npm/lib/config/core.js:109:8) at Conf. (/usr/local/lib/node_modules/homebridge-controllerlink/node_modules/npm/lib/config/core.js:96:5) at emitOne (events.js:77:13) at Conf.emit (events.js:169:7) at ConfigChain._resolve (/usr/local/lib/node_modules/homebridge-controllerlink/node_modules/npm/node_modules/config-chain/index.js:281:34) at ConfigChain.add (/usr/local/lib/node_modules/homebridge-controllerlink/node_modules/npm/node_modules/config-chain/index.js:259:10) at Conf.add (/usr/local/lib/node_modules/homebridge-controllerlink/node_modules/npm/lib/config/core.js:341:27) at Conf. (/usr/local/lib/node_modules/homebridge-controllerlink/node_modules/npm/lib/config/core.js:320:25) at ReadFileContext.callback (/usr/local/lib/node_modules/homebridge-controllerlink/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16) at FSReqWrap.readFileAfterOpen as oncomplete

drgonz0 avatar Oct 04 '16 11:10 drgonz0

FYI, I'm getting this too

JangoBritt avatar Oct 06 '16 20:10 JangoBritt

same here

frodeaux avatar Oct 07 '16 17:10 frodeaux

Ohh sweet. At least I"m not alone. It was working prior.

drgonz0 avatar Oct 08 '16 02:10 drgonz0

same here.

ovq avatar Oct 10 '16 09:10 ovq

Oh Dear. @KraigM, sounds like there may be a recurring issue. Happy to help Debug.

JangoBritt avatar Oct 10 '16 09:10 JangoBritt

Happy to provide logs/whatever you need.

drgonz0 avatar Oct 10 '16 20:10 drgonz0

Same here. I had Homebridge working great, but I wanted to install HomeBridgeController as well to fix Celcius/ Fahrenheit issues, but I can't get HomeBridge to load now.

Dazzzz avatar Oct 14 '16 18:10 Dazzzz

Same issue for me.

Chioti avatar Oct 18 '16 18:10 Chioti

Similar here. I had it running when I was using my Mac as a homebridge station, but when I switched to Pi, it broke and I get this error. FWIW, I get this error on several plugins, not just the homebridge-controllerlink one.

a2sheppy avatar Nov 01 '16 18:11 a2sheppy

Looking through things, I wonder: could it be using the wrong node to run homebridge? There are at least two copies installed: one at /usr/bin/node and the one installed under the pi user that's intended to be used.

a2sheppy avatar Nov 01 '16 18:11 a2sheppy

I was able to fix this by doing the following:

on line 43 of /usr/local/lib/node_modules/homebridge-controllerlink/node_modules/npm/lib/config/load-prefix.js

i changed:

p = path.resolve(cli.prefix)

to

p = path.resolve(String(cli.prefix))

and on line 21 of /usr/local/lib/node_modules/homebridge-controllerlink/node_modules/npm/lib/config/set-user.js

i changed

var prefix = path.resolve(this.get('prefix'))

to

var prefix = path.resolve(String(this.get('prefix')))

jaredmichaelwilliams avatar Nov 05 '16 03:11 jaredmichaelwilliams

@jaredmichaelwilliams this fixed my issue too!

RickNunn avatar Nov 05 '16 13:11 RickNunn

And for me as well. Thanks!

Chioti avatar Nov 05 '16 21:11 Chioti

@jaredmichaelwilliams This worked here as well. Thank you.

drgonz0 avatar Nov 06 '16 21:11 drgonz0

@jaredmichaelwilliams Thank you!!!!! the fix worked for me.

livefeed avatar Jan 27 '17 16:01 livefeed

Thanks for the fix. Can it be published to the source ?

rhapsfx avatar Feb 28 '17 20:02 rhapsfx

Thnx for the fix !

IMNotMax avatar Apr 26 '17 02:04 IMNotMax