ignite / cli

Ignite is a CLI tool and hub designed for constructing Proof of Stake Blockchains rooted in Cosmos-SDK
https://ignite.com
Other
1.26k stars 547 forks source link

after install and verify prereqs, cannot run starport app command #847

Closed barriebyron closed 3 years ago

barriebyron commented 3 years ago

I verified my $PATH, the prerequisites:

I tried running this command:

starport app github.com/barriebyron/myapp but got this error message:

myapp/query.proto:4:1: warning: Import google/api/annotations.proto is unused.
myapp/query.proto:5:1: warning: Import cosmos/base/query/v1beta1/pagination.proto is unused.
protoc-gen-gocosmos: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--gocosmos_out: protoc-gen-gocosmos: Plugin failed with status code 1.
: exit status 1

@lukitsbrian tried to replicate, but his environment is probably more fleshed out so we could not reproduce. Any ideas?

barriebyron commented 3 years ago

@fadeev also looked and we think this is "a proper bug"

barriebyron commented 3 years ago

could be M1? image

ilgooz commented 3 years ago

Hey @barriebyron, what's the output of echo $PATH?

barriebyron commented 3 years ago

@ilgooz

➜  ~ echo $PATH
/Users/barriebyron/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin
ilgooz commented 3 years ago

Can you please add $GOPATH/bin to your $PATH as well and try again?

export PATH=$PATH:$GOPATH/bin.

barriebyron commented 3 years ago
➜  ~ export PATH=$PATH:$GOPATH/bin
➜  ~ starport app github.com/hello/world

world/query.proto:4:1: warning: Import google/api/annotations.proto is unused.
world/query.proto:5:1: warning: Import cosmos/base/query/v1beta1/pagination.proto is unused.
protoc-gen-gocosmos: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--gocosmos_out: protoc-gen-gocosmos: Plugin failed with status code 1.
: exit status 1

I followed the Starport install doc that we can update if needed

ilgooz commented 3 years ago

It should be beacause GOPATH is not set also. But it is not required if GOBIN is set.

Can you please follow the instructions here to see if it'll work this time? Then I think it would really nice to include this to our docs.

barriebyron commented 3 years ago

thanks @ilgooz it was a Go installation kerfluffle that was solved by making sure that $HOME/go/bin was in the $PATH env variable, my .zshrc file now includes:

export PATH=$HOME/bin:/usr/local/bin:$PATH:$HOME/go/bin

barriebyron commented 3 years ago

@ilgooz how do we close this issue? (teach me!)

ilgooz commented 3 years ago

image