go-kratos / kratos

Your ultimate Go microservices framework for the cloud-native era.
https://go-kratos.dev
MIT License
23.41k stars 4.01k forks source link

kratos proto client api/helloworld/v2 fail? #3381

Closed williamtse closed 3 months ago

williamtse commented 4 months ago

What happened:

kratos proto client api/helloworld/v2 go install github.com/go-kratos/kratos/cmd/kratos/v2@latest go install github.com/go-kratos/kratos/cmd/protoc-gen-go-http/v2@latest go install github.com/go-kratos/kratos/cmd/protoc-gen-go-errors/v2@latest go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest go: google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest (in google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.0): The go.mod file for the module providing named packages contains one or more replace directives. It must not contain directives that would cause it to be interpreted differently than if it were the main module. exit status 1

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

kratos proto client api/helloworld/v2

Anything else we need to know?:

Environment:

lonetrail commented 3 months ago

Protoc-gen-go-grpc v1.5.0 is incompatible with go install command. Updating to the latest version v1.5.1, should fix this issue.

Protoc-gen-go-grpc 1.5.1 release note mentioned this issue.