Twirp not working with proto

1000 Views Asked by At

I seem to be unable to install twirp correctly to work with protobuf.

protoc --proto_path=$GOPATH/bin:. --twirp_out=. --go_out=. ./rpc/person/service.proto

is the command I'm trying to do when compiling and creating my twirp file, however I get the following error:

protoc-gen-twirp:program not found or is not executable
--twirp_out: protoc-gen-twirp: Plugin failed with status code 1.

My .bashrc already has these two lines for Golang:

export GOPATH=/home/carlosrueda/Documents/go
PATH=$PATH:/usr/local/bin/go/bin:$GOPATH

Any help to solve this will be greatly appreciated, thank you.

1

There are 1 best solutions below

0
On

I fixed this by adding /bin at the end of the second line in my .bashrc. PATH=$PATH:/usr/local/bin/go/bin:$GOPATH/bin