Protobuf build error with gogo - has inconsistent names structpb

585 views
Skip to first unread message

santhoshth...@gmail.com

unread,
Jul 25, 2022, 5:08:18 AM7/25/22
to golang-nuts
Hi Everyone

I am importing the proto of other project into my proto file and run protoc command. 
I got this below error :

Go package "github.com/gogo/protobuf/types" has inconsistent names structpb (google/protobuf/struct.proto) and timestamppb (google/protobuf/timestamp.proto)

protoc command:
User/project/web/tools/protoc-3.17.3/bin/protoc
--proto_path=User/project:.
-I=User/project/web/rpc/protomgr
-I=User/project/web/protobuf-import
--plugin=protoc-gen-twirp=User/project/bin/protoc-gen-twirp
--plugin=protoc-gen-go=User/project/bin/protoc-gen-go --plugin=protoc-gen-go-grpc=User/project/bin/protoc-gen-go-grpc
--twirp_out=.
go_out=Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types:. proto_file.proto


The both proto files has the import of
import "google/protobuf/timestamp.proto";
import "google/protobuf/struct.proto";



I can't figure out what is happening here. Can somebody provide some suggestions? 

Ian Vernon (ianvernon92)

unread,
May 28, 2024, 3:23:34 PM5/28/24
to golang-nuts
Did you ever figure this out? I am hitting the same issue, and it's quite frustrating :(
Reply all
Reply to author
Forward
0 new messages