infobloxopen / atlas-cli

Apache License 2.0
14 stars 45 forks source link

atlas init-app throws error "Starting mod project... exit status 1" #63

Open selvamkrishnamoorthy opened 4 years ago

selvamkrishnamoorthy commented 4 years ago

As described in the readme I pulled atlas-cli binary and ran atlas init-app -name=heka.cloud. But it throws below error.

sk@sk-VirtualBox:~/go/src/github.com/Infoblox-CTO$ atlas init-app -name=heka.cloud
Generating protobuf files... done!
Starting mod project... exit status 1

But i could see that project folder got created with name heka.cloud. Then i created go.mod and ran go mod vendor command which also throws error for protoc-gen-validate.

sk@sk-VirtualBox:~/go/src/github.com/Infoblox-CTO/heka.cloud$ cat go.mod 
module github.com/Infoblox-CTO/heka.cloud
go 1.14
sk@sk-VirtualBox:~/go/src/github.com/Infoblox-CTO/heka.cloud$ go mod vendor
go: finding module for package github.com/prometheus/client_golang/prometheus/promhttp
go: finding module for package google.golang.org/grpc
go: finding module for package github.com/grpc-ecosystem/go-grpc-prometheus
go: finding module for package github.com/infobloxopen/atlas-app-toolkit/server
go: finding module for package github.com/sirupsen/logrus
go: finding module for package github.com/infobloxopen/atlas-app-toolkit/gorm/resource
go: finding module for package github.com/spf13/pflag
go: finding module for package github.com/grpc-ecosystem/go-grpc-middleware/validator
go: finding module for package github.com/grpc-ecosystem/go-grpc-middleware
go: finding module for package github.com/infobloxopen/atlas-app-toolkit/requestid
go: finding module for package github.com/infobloxopen/atlas-app-toolkit/gateway
go: finding module for package github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus
go: finding module for package github.com/golang/protobuf/proto
go: finding module for package github.com/golang/protobuf/ptypes
go: finding module for package google.golang.org/genproto/googleapis/api/annotations
go: finding module for package github.com/golang/protobuf/ptypes/empty
go: finding module for package github.com/spf13/viper
go: finding module for package github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options
go: finding module for package github.com/lyft/protoc-gen-validate/validate
go: found github.com/grpc-ecosystem/go-grpc-middleware in github.com/grpc-ecosystem/go-grpc-middleware v1.2.0
go: found github.com/grpc-ecosystem/go-grpc-prometheus in github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
go: found github.com/infobloxopen/atlas-app-toolkit/gateway in github.com/infobloxopen/atlas-app-toolkit v0.22.0
go: found github.com/prometheus/client_golang/prometheus/promhttp in github.com/prometheus/client_golang v1.7.1
go: found github.com/sirupsen/logrus in github.com/sirupsen/logrus v1.6.0
go: found github.com/spf13/pflag in github.com/spf13/pflag v1.0.5
go: found github.com/spf13/viper in github.com/spf13/viper v1.7.0
go: found google.golang.org/grpc in google.golang.org/grpc v1.30.0
go: found github.com/golang/protobuf/proto in github.com/golang/protobuf v1.4.2
go: found github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options in github.com/grpc-ecosystem/grpc-gateway v1.14.6
go: found github.com/lyft/protoc-gen-validate/validate in github.com/lyft/protoc-gen-validate v0.4.0
go: found google.golang.org/genproto/googleapis/api/annotations in google.golang.org/genproto v0.0.0-20200711021454-869866162049
go: github.com/Infoblox-CTO/heka.cloud/pkg/pb imports
    github.com/lyft/protoc-gen-validate/validate: github.com/lyft/protoc-gen-validate@v0.4.0: parsing go.mod:
    module declares its path as: github.com/envoyproxy/protoc-gen-validate
            but was required as: github.com/lyft/protoc-gen-validate

I even set GO111MODULE="auto" but no luck.

sk@sk-VirtualBox:~/go/src/github.com/Infoblox-CTO$ go env
GO111MODULE="auto"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/sk/.cache/go-build"
GOENV="/home/sk/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/sk/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build284363722=/tmp/go-build -gno-record-gcc-switches"

How to resolve this exit status 1 and go mod vendor error?

smailic05 commented 2 years ago

I tried to reproduce the bug, but I did not find anything, perhaps it was fixed in one of the releases or maybe the bug on your side