ent-grpc-example icon indicating copy to clipboard operation
ent-grpc-example copied to clipboard

protoc-gen-entgrpc: program not found or is not executable

Open gedw99 opened this issue 3 years ago • 0 comments

generate for grpc is not running for me in https://github.com/rotemtam/ent-grpc-example/blob/main/ent/generate.go

here is a full run:


rm -rf ent-grpc-example
git clone https://github.com/rotemtam/ent-grpc-example
Cloning into 'ent-grpc-example'...
remote: Enumerating objects: 135, done.
remote: Counting objects: 100% (135/135), done.
remote: Compressing objects: 100% (77/77), done.
remote: Total 135 (delta 55), reused 119 (delta 42), pack-reused 0
Receiving objects: 100% (135/135), 89.99 KiB | 2.57 MiB/s, done.
Resolving deltas: 100% (55/55), done.
cd ent-grpc-example && go mod tidy
cd ent-grpc-example && go mod download
cd ent-grpc-example && go mod vendor
cd ent-grpc-example && go generate -v ./...
pb_test.go
service_test.go
cmd/client/main.go
cmd/server/main.go
ent/category.go
ent/category_create.go
ent/category_delete.go
ent/category_query.go
ent/category_update.go
ent/client.go
ent/config.go
ent/context.go
ent/ent.go
ent/generate.go
ent/mutation.go
ent/runtime.go
ent/tx.go
ent/user.go
ent/user_create.go
ent/user_delete.go
ent/user_query.go
ent/user_update.go
ent/category/category.go
ent/category/where.go
ent/enttest/enttest.go
ent/hook/hook.go
ent/migrate/migrate.go
ent/migrate/schema.go
ent/predicate/predicate.go
ent/proto/entpb/entpb.pb.go
ent/proto/entpb/entpb_grpc.pb.go
ent/proto/entpb/entpb_user_service.go
ent/proto/entpb/generate.go
protoc-gen-entgrpc: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--entgrpc_out: protoc-gen-entgrpc: Plugin failed with status code 1.
ent/proto/entpb/generate.go:3: running "protoc": exit status 1
ent/runtime/runtime.go
ent/schema/category.go
ent/schema/user.go
ent/user/user.go
ent/user/where.go
make: *** [gen] Error 1

I get this same error on other examples also, so its something i am not understanding maybe ?

the generate.go has :

package ent

//go:generate go run -mod=mod entgo.io/ent/cmd/ent generate ./schema
//go:generate go run -mod=mod entgo.io/contrib/entproto/cmd/entproto -path ./schema

and so i presume the -mod=mod ensures that these binaries get downloaded, and i dont have to do it.

gedw99 avatar Aug 05 '21 08:08 gedw99