tokopedia / gripmock

gRPC Mock Server
Apache License 2.0
659 stars 156 forks source link

Keep getting undefined: proto. when using multiple files docker run command #145

Closed baoke344 closed 1 year ago

baoke344 commented 1 year ago

I am trying to generate mock server with following command docker run -p 4770:4770 -p 4771:4771 -v $PWD/proto:/proto tkpd/gripmock /proto/AppService.proto /proto/AppIntegrationDto.proto

Where AppService.proto is main proto and import AppInegrationDto.proto

I keep getting the following error

Serving stub admin on http://:4771
grpc server pid: 172
# command-line-arguments
/go/src/grpc/server.go:29:77: undefined: proto.Get3rdPartyIntegrationsReq
/go/src/grpc/server.go:29:113: undefined: proto.Get3rdPartyIntegrationsRes
/go/src/grpc/server.go:30:16: undefined: proto.Get3rdPartyIntegrationsRes
2023/06/20 09:11:33 exit status 1

Both Get3rdPartyIntegrationsReq and Get3rdPartyIntegrationsRes are well defined in the proto file If I use protobuf to generate the above 2 find, it generated AppService.pb.go without any error

Any ideal where did I do wrong? and how to troubleshot it