gogo / grpc-example

An example of using Go gRPC and tools from the greater gRPC ecosystem together with the GoGo Protobuf Project.
Other
454 stars 88 forks source link

error occurred #34

Closed jackey925 closed 4 years ago

jackey925 commented 4 years ago

I made following error while running the 'make generate' instruction thank's for you helper

google/protobuf/empty.proto: File not found. google/protobuf/timestamp.proto: File not found. google/protobuf/duration.proto: File not found. google/protobuf/field_mask.proto: File not found. google/protobuf/descriptor.proto: File not found. google/api/annotations.proto:20:1: Import "google/protobuf/descriptor.proto" was not found or had errors. google/api/annotations.proto:28:8: "google.protobuf.MethodOptions" is not defined. google/protobuf/any.proto: File not found. protoc-gen-swagger/options/openapiv2.proto:7:1: Import "google/protobuf/any.proto" was not found or had errors. protoc-gen-swagger/options/openapiv2.proto:141:3: "google.protobuf.Any" is not defined. protoc-gen-swagger/options/annotations.proto:7:1: Import "protoc-gen-swagger/options/openapiv2.proto" was not found or had errors. protoc-gen-swagger/options/annotations.proto:8:1: Import "google/protobuf/descriptor.proto" was not found or had errors. protoc-gen-swagger/options/annotations.proto:10:8: "google.protobuf.FileOptions" is not defined. protoc-gen-swagger/options/annotations.proto:17:8: "google.protobuf.MethodOptions" is not defined. protoc-gen-swagger/options/annotations.proto:24:8: "google.protobuf.MessageOptions" is not defined. protoc-gen-swagger/options/annotations.proto:31:8: "google.protobuf.ServiceOptions" is not defined. protoc-gen-swagger/options/annotations.proto:38:8: "google.protobuf.FieldOptions" is not defined. github.com/gogo/protobuf/gogoproto/gogo.proto:32:1: Import "google/protobuf/descriptor.proto" was not found or had errors. github.com/gogo/protobuf/gogoproto/gogo.proto:38:8: "google.protobuf.EnumOptions" is not defined. github.com/gogo/protobuf/gogoproto/gogo.proto: "google.protobuf.EnumOptions" is not defined. github.com/gogo/protobuf/gogoproto/gogo.proto: "google.protobuf.EnumOptions" is not defined. github.com/gogo/protobuf/gogoproto/gogo.proto: "google.protobuf.EnumOptions" is not defined.

johanbrandhorst commented 4 years ago

This will happen if you have an incomplete protoc installation. A full protoc installation will include the well known types automatically (which are the files that your error are missing). Try installing protoc from one of their releases and rerunning the command: https://github.com/protocolbuffers/protobuf/releases.