brutella / hkcam

Open-Source HomeKit Surveillance Camera
https://hochgatterer.me/hkcam/
Apache License 2.0
932 stars 141 forks source link

Running go task for hkcam fails with "esc": executable file not found in $PATH #127

Closed djiwondee closed 2 years ago

djiwondee commented 2 years ago

Hello,

I try build and run cmd/hkcam/main.go by running task hkcam in Terminal as mentioned in README.md

The command task hkcam -v -t Taskfile.yml fails with

task: "hkcam" started
task: "build-fs" started
task: [build-fs] esc -o cmd/hkcam/fs.go -ignore ".*\.go" html static
"esc": executable file not found in $PATH
task: Failed to run task "hkcam": task: Failed to run task "build-fs": exit status 127

I found out the esc cmd is specified in Taskfile.yml of the hkcam-repo, but I have now glue what particular path for the executable esc needs to be added to my $PATH.

Any advice appreciated. Thanks in advance!

brutella commented 2 years ago

Ah sorry, esc is from http://github.com/mjibson/esc and can be installed with go get -u github.com/mjibson/esc

dfbills commented 2 years ago

Hi @brutella- seeing the same issue here. Can you help with setting the path to esc once it's been installed by go? I was expecting:

export GOPATH=$HOME/go export GOROOT=/opt/homebrew/Cellar/go/1.18.2/libexec export PATH=$PATH:$GOPATH/bin export PATH=$PATH:$GOROOT/bin

tqcenglish commented 2 years ago

try this

go install github.com/mjibson/esc@latest
dfbills commented 2 years ago

Hey @tqcenglish- I did install esc, but I'm still getting errors about "esc": executable file not found in $PATH. Not sure what the proper path should be. I reviewed several tutorials, but I'm not a go developer or using it regularly.

Since I did install my go through Homebrew, I was able to find the binary here:

/opt/homebrew/Cellar/go/1.18.2/libexec/bin/go

But, I'm not sure which var is incorrect in the Go paths:

export GOPATH=$HOME/go export GOROOT=/opt/homebrew/Cellar/go/1.18.2/libexec export PATH=$PATH:$GOPATH/bin export PATH=$PATH:$GOROOT/bin

tqcenglish commented 2 years ago

@dfbills if you install esc success, you can find the esc bin file, and add it path to $PATH.