dgreif / homebridge-hatch-baby-rest

A homebridge plugin for Hatch Baby Rest night light
MIT License
74 stars 19 forks source link

Trouble with Homebridge Install #37

Closed sbarstow93 closed 3 years ago

sbarstow93 commented 3 years ago

Hi!

Im really excited about this plug in! I have a rest and a rest+ that will be so nice to have in homekit. I keep getting an error though when I go to install that I would love some help with.. Below is what happens in terminal

Do I need to have code on the mac for this to work?

sethbarstow@GC-Audio ~ % npm i -g homebridge-hatch-baby-rest-volume

@abandonware/noble@1.9.2-10 install /usr/local/lib/node_modules/homebridge-hatch-baby-rest-volume/node_modules/@abandonware/noble node-gyp rebuild

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected! gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) gyp ERR! System Darwin 19.6.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-hatch-baby-rest-volume/node_modules/@abandonware/noble gyp ERR! node -v v14.15.3 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/bluetooth-hci-socket@^0.5.3-5 (node_modules/homebridge-hatch-baby-rest-volume/node_modules/@abandonware/noble/node_modules/@abandonware/bluetooth-hci-socket): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @abandonware/bluetooth-hci-socket@0.5.3-6: wanted {"os":"linux,android,freebsd,win32","arch":"any"} (current: {"os":"darwin","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @abandonware/noble@1.9.2-10 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @abandonware/noble@1.9.2-10 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/sethbarstow/.npm/_logs/2020-12-21T22_25_43_865Z-debug.log sethbarstow@GC-Audio ~ %

dgreif commented 3 years ago

Looks like you are trying to install homebridge-hatch-baby-rest-volume, which is actually a different plugin that is forked from this one. You should run npm i -g homebridge-hatch-baby-rest instead. With that aside, you appear to be installing on a mac, which requires xcode cli tools. See this article for some steps you can take to get those installed properly: https://medium.com/flawless-app-stories/gyp-no-xcode-or-clt-version-detected-macos-catalina-anansewaa-38b536389e8d

ORIONSS88 commented 3 years ago

dgreif,

I am also having trouble installing this. Any feedback would be great. Looks like its saying I am having permission issues.

hoobs@hoobs:/home/hoobs/.hoobs/etc $ npm i -g homebridge-hatch-baby-rest npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm ERR! code EACCES npm ERR! syscall access npm ERR! path /usr/local/lib/node_modules npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] { npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in: npm ERR! /home/hoobs/.npm/_logs/2021-01-06T03_15_27_009Z-debug.log

dgreif commented 3 years ago

@ORIONSS88 you need to run sudo npm i -g homebridge-hatch-baby-rest. Lack of sudo is why you are seeing that error. I highly recommend using homebridge-config-ui-x which helps mitigate this type of install issues