air
air copied to clipboard
Air not being installed in zsh path on macOS
Followed instructions to install Air via go install
using zsh on macOS but it gives the error zsh: command is not found: air
. Tried to follow the commands under Q&A but it didn't work for me. I am not sure if I'm doing it correctly.
Went through this today. Make sure to add:
export PATH=$PATH:$HOME/go/bin
to your .zshrc file. Then reload your terminal.
This seems to be the destination of go install
files.
This worked for me. Edit your .zshrc file:
# hot reload for go servers using air
path+=('~/go/bin')
alias air='~/go/bin/.air'
in my case, ".air" is not exist in go/bin instead "air" without dot.
just update above code to use
alias air='~/go/bin/air'
then its works for me.
in my case, ".air" is not exist in go/bin instead "air" without dot. just update above code to use
alias air='~/go/bin/air'
then its works for me.
this worked for me , thanks.
in my case, ".air" is not exist in go/bin instead "air" without dot. just update above code to use
alias air='~/go/bin/air'
then its works for me.
this works also for me (macOS M1)
https://github.com/cosmtrek/air?tab=readme-ov-file#command-not-found-air-or-no-such-file-or-directory
Rather than adding an alias, I would reckon this is the more proper solution: export PATH=$PATH:$HOME/go/bin
Because in the future when you add other tools using go install
, they would automatically benefit from it as well.
I'd suggest adding this information in the "Via go install (Recommended)" section itself, as it's currently buried in Q&A only, way below.
in my case, ".air" is not exist in go/bin instead "air" without dot. just update above code to use
alias air='~/go/bin/air'
then its works for me.
Worked for me