docs says.
- go install github.com/a-h/templ/cmd/templ@latest [This does not work.]
what I did. 1.
git clone https://github.com/a-h/templ.git [in /tmp]
cd cmd/templ && go install
still Error.
Solution I came up with. 1.
alias templ=$HOME/go/bin/templ [also added in ~/.zshrc]
why this does not work
go install github.com/a-h/templ/cmd/templ@latest
How Can I resolve it.
go installworked just fine as you can see from the alias you created. It only works because the installation was successful.Add
export PATH="$PATH:$HOME/go/bin"to your~/.zshrcfile to add Go's default installation folder toPATH. That way all binaries that are installed withgo installwill be available globally.