hkcam icon indicating copy to clipboard operation
hkcam copied to clipboard

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

Open djiwondee opened this issue 2 years ago • 5 comments

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!

djiwondee avatar May 05 '22 14:05 djiwondee

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

brutella avatar May 05 '22 15:05 brutella

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

dfbills avatar May 16 '22 22:05 dfbills

try this

go install github.com/mjibson/esc@latest

tqcenglish avatar May 26 '22 06:05 tqcenglish

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

dfbills avatar May 26 '22 15:05 dfbills

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

tqcenglish avatar May 27 '22 15:05 tqcenglish