Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1.1.1]failed: the work directory must be found in the go mod or the $GOPATH #16

Open
fangxh2013 opened this issue May 5, 2022 · 4 comments

Comments

@fangxh2013
Copy link

fangxh2013 commented May 5, 2022

macOS: 12.3.1

goctl-intellij version:1.1.1

go-zero version: 1.3.3

goctl version 1.3.5 darwin/amd64

use goctl rpc protoc account.proto --go_out=. --go-grpc_out=. --zrpc_out=. generate success.

Right click to use goctl to generate rpc code, the following error occurs:

14:32 Use shell: bash

14:32 lookup at PATH: /usr/bin:/bin:/usr/sbin:/sbin

14:32 lookup at the default GOPATH: /Users/golang/go/bin/goctl

14:32 Use shell: bash

14:32 goctl:/Users/golang/go/bin/goctl

14:33 $ goctl rpc protoc -I /Users/golang/Documents/git/wallet-core/service/account/rpc /Users/golang/Documents/git/wallet-core/service/account/rpc/account.proto --style gozero --zrpc_out /Users/golang/Documents/git/wallet-core/service/account/rpc --go_out /Users/golang/Documents/git/wallet-core/service/account/rpc --go-grpc_out /Users/golang/Documents/git/wallet-core/service/account/rpc --home /Users/golang/.goctl

14:33 Exit code 1

14:33 get project context from workdir[/Users/golang/Documents/git/wallet-core/service/account/rpc] failed: the work directory must be found in the go mod or the $GOPATH
�[31msh: go: command not found�[0m

@fangxh2013 fangxh2013 changed the title failed: the work directory must be found in the go mod or the $GOPATH [v1.1.1]failed: the work directory must be found in the go mod or the $GOPATH May 5, 2022
@kesonan
Copy link
Collaborator

kesonan commented May 8, 2022

It seems that your are not installed golang on you machine!

@fangxh2013
Copy link
Author

It seems that your are not installed golang on you machine!

go version go1.17.2 darwin/amd64

@fangxh2013
Copy link
Author

It seems that your are not installed golang on you machine!

goctl version 1.3.0, goctl-intellij version 1.0.0 and earlier versions can be used normally

@icecoffee531
Copy link

same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants