GrantZheng / kit

GoKit CLI
MIT License
268 stars 54 forks source link

ERRO[0000] exit status 1 #18

Closed jackywu closed 2 years ago

jackywu commented 3 years ago
→ go version
go version go1.14.2 darwin/amd64

→  kit new service hello 
→  kit generate  service hello -t grpc
ERRO[0000] exit status 1

→ kit generate  service hello --debug  -t grpc
ERRO[0000] exit status 1
GrantZheng commented 3 years ago
→ go version
go version go1.14.2 darwin/amd64

→  kit new service hello 
→  kit generate  service hello -t grpc
ERRO[0000] exit status 1

→ kit generate  service hello --debug  -t grpc
ERRO[0000] exit status 1

Hi, are you sure that your protoc-gen-go is installed correctly?https://github.com/GrantZheng/kit/issues/17

jackywu commented 3 years ago

@GrantZheng yes, installed, is there a way to display any verbose debug message?

technolingo commented 3 years ago

@GrantZheng yes, installed, is there a way to display any verbose debug message?

Yes, I'm also facing the same issue. I see both protoc-gen-go and protoc-gen-go-grpc in my $GOPATH/bin, and GOPATH is also set correct in zshrc.

GrantZheng commented 3 years ago

@GrantZheng yes, installed, is there a way to display any verbose debug message?

Yes, I'm also facing the same issue. I see both protoc-gen-go and protoc-gen-go-grpc in my $GOPATH/bin, and GOPATH is also set correct in zshrc.

Hi, try to upgrade go version and use module feature ?

diegoquiroz commented 3 years ago

Hi, I'm facing the same ERRO[0000].

Go version: 1.16.5 OS: macOS 11.4

Steps to reproduce:

  1. Installed protoc with Homebrew: brew install protobuf protoc-gen-go protoc-gen-go-grpc
  2. Kit generate:
    kit n s service_name
    kit g s service_name --dmw
    kit g s service_name -t grpc
GrantZheng commented 3 years ago

Hi, I'm facing the same ERRO[0000].

Go version: 1.16.5 OS: macOS 11.4

Steps to reproduce:

  1. Installed protoc with Homebrew: brew install protobuf protoc-gen-go protoc-gen-go-grpc
  2. Kit generate:
kit n s service_name
kit g s service_name --dmw
kit g s service_name -t grpc

Hi, try to use this method(https://grpc.io/docs/languages/go/quickstart/) to install ? I will add debug message for it and find a new environment to try to reproduce it.

diegoquiroz commented 3 years ago

Sorry for the late reply. Is still not working with any type of installation method (tried brew, go get and source)

zeknox commented 3 years ago

Hi All-

Also having this same issue when generating a service with type grpc. Works great when removing the -t grpc flag. Anyone have a workaround for this?

% kit g s IP --dmw -t grpc --debug
ERRO[0000] exit status 1

Versions

Go version: go1.17 darwin/amd64
OS: macOS 10.15.7
0x0ece commented 3 years ago

Can anyone share a working config (go version, protoc --version; and maybe installation steps as docs got out of date)?

oldmonad commented 2 years ago

Hi has anyone been able to fix this?, can't seem to be able to get it to work, and I have tried all installation methods including this one

JianleiZhang commented 2 years ago

add option go_package to the proto file. image rerun the kit command will be fine. image

Edwardz43 commented 2 years ago

add option go_package to the proto file. image rerun the kit command will be fine. image

Can you please share you project structure ? I faced the same issue and I'm not sure about that my project(folder) structure was correct or not.

GrantZheng commented 2 years ago

Can anyone share a working config (go version, protoc --version; and maybe installation steps as docs got out of date)?

protoc --version libprotoc 3.13.0

go version go version go1.15.4 darwin/amd64

GrantZheng commented 2 years ago

add option go_package to the proto file. image rerun the kit command will be fine. image

Can you please share you project structure ? I faced the same issue and I'm not sure about that my project(folder) structure was correct or not.

└── hello ├── cmd │   ├── main.go │   └── service │   ├── service.go │   └── service_gen.go ├── go.mod └── pkg ├── endpoint │   ├── endpoint.go │   └── endpoint_gen.go ├── grpc │   ├── handler.go │   ├── handler_gen.go │   └── pb │   ├── compile.sh │   ├── hello.pb.go │   └── hello.proto └── service ├── middleware.go └── service.go

Edwardz43 commented 2 years ago

@JianleiZhang, @GrantZheng thanks your help ! It works both on MBP and WSL2 environment.

WSL2:

go version go1.17.2 linux/amd64
libprotoc 3.19.1

MBP:

go version go1.17.3 darwin/amd64
libprotoc 3.17.3
Chanonry commented 2 years ago

This was not a perfect fix for me.

Rerunning kit g s hello -t grpc failed to generate hello.pb.go. So I compiled and sorted out the folder structure which was fine, but it isn't clear to me why compilation failed for me?

Is the file structure above correct ? I assume it should show compile.sh hello.pb.go & hello.proto within the pb folder not at the same level.

Edwardz43 commented 2 years ago

This was not a perfect fix for me.

Rerunning kit g s hello -t grpc failed to generate hello.pb.go. So I compiled and sorted out the folder structure which was fine, but it isn't clear to me why compilation failed for me?

Is the file structure above correct ? I assume it should show compile.sh hello.pb.go & hello.proto within the pb folder not at the same level.

截圖 2022-01-07 上午11 49 25

try these steps and add option go_package = "./SERVICE_NAME" to .proto file

it works for me

Chanonry commented 2 years ago

and that's my point. It does not work for me

bootun commented 2 years ago

@Chanonry now I contribute a pull request, before it merges in the repository, you can use bootun/kit to solve the problem

bootun commented 2 years ago

when generate gRPC code, gokit cli will now currently throw an exception