cli icon indicating copy to clipboard operation
cli copied to clipboard

Ignite CLI tutorial : Unable to scaffold the basic chain

Open kristiann57 opened this issue 1 year ago • 3 comments

Describe the bug I am using Docker version 26.0.0 on my WSL terminal on a Windows Machine to follow all the tutorials, I decided to use Docker to avoid any potential compatibility and version issues with different packages but it seems that I haven't been able to avoid this.

To reproduce I am using the following Docker file to create the image I am working with, be aware it is exactly the same as stated in the tutorial website:

FROM --platform=linux ubuntu:22.04
ARG BUILDARCH

# Change your versions here
ENV GO_VERSION=1.18.3
ENV IGNITE_VERSION=0.22.1
ENV NODE_VERSION=18.x

ENV LOCAL=/usr/local
ENV GOROOT=$LOCAL/go
ENV HOME=/root
ENV GOPATH=$HOME/go
ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH

RUN mkdir -p $GOPATH/bin

ENV PACKAGES curl gcc
RUN apt-get update
RUN apt-get install -y $PACKAGES

# Install Go
RUN curl -L https://go.dev/dl/go${GO_VERSION}.linux-$BUILDARCH.tar.gz | tar -C $LOCAL -xzf -

# Install ignite
RUN curl -L https://get.ignite.com/cli@v${IGNITE_VERSION}! | bash

RUN apt-get clean

EXPOSE 1317 3000 4500 5000 26657

WORKDIR /checkers

After this, I run the following command to create the image:

docker build -f Dockerfile-ubuntu . -t checkers_i

and then the following command to scaffold the chain(this is when the error occurs):

docker run --rm -it \
    -v $(pwd):/checkers -w /checkers \
    checkers_i \
    ignite scaffold chain github.com/alice/checkers

the output is the following:

go: downloading github.com/grpc-ecosystem/grpc-gateway v1.16.0
go: downloading github.com/regen-network/cosmos-proto v0.3.1
go: downloading github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0
go: downloading github.com/golang/protobuf v1.5.4
go: downloading github.com/golang/glog v1.0.0
go: downloading google.golang.org/grpc v1.33.2
go: downloading google.golang.org/protobuf v1.34.1
go: downloading github.com/regen-network/protobuf v1.3.3-alpha.regen.1
go: downloading github.com/ghodss/yaml v1.0.0
go: downloading google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8
go: downloading golang.org/x/text v0.15.0
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8
go: downloading google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291
go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291
go: downloading google.golang.org/genproto v0.0.0-20240515191416-fc5f0ca64291
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway imports
        github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway/descriptor imports
        google.golang.org/genproto/googleapis/api/annotations: ambiguous import: found package google.golang.org/genproto/googleapis/api/annotations in multiple modules:
        google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd (/root/go/pkg/mod/google.golang.org/[email protected]/googleapis/api/annotations)
        google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291 (/root/go/pkg/mod/google.golang.org/genproto/googleapis/[email protected]/annotations)
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 imports
        github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/internal/genopenapi imports
        google.golang.org/genproto/googleapis/api/visibility: ambiguous import: found package google.golang.org/genproto/googleapis/api/visibility in multiple modules:
        google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd (/root/go/pkg/mod/google.golang.org/[email protected]/googleapis/api/visibility)
        google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291 (/root/go/pkg/mod/google.golang.org/genproto/googleapis/[email protected]/visibility)
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 imports
        github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/internal/genopenapi imports
        google.golang.org/genproto/googleapis/rpc/status: ambiguous import: found package google.golang.org/genproto/googleapis/rpc/status in multiple modules:
        google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd (/root/go/pkg/mod/google.golang.org/[email protected]/googleapis/rpc/status)
        google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 (/root/go/pkg/mod/google.golang.org/genproto/googleapis/[email protected]/status)
go: downloading github.com/google/go-cmp v0.6.0
go: downloading github.com/kr/pretty v0.3.1
go: downloading golang.org/x/crypto v0.21.0
go: downloading golang.org/x/mod v0.8.0
go: downloading golang.org/x/net v0.23.0
go: downloading golang.org/x/sync v0.1.0
go: downloading golang.org/x/sys v0.18.0
go: downloading golang.org/x/term v0.18.0
go: module github.com/golang/protobuf is deprecated: Use the "google.golang.org/protobuf" module instead.
: exit status 1

Could someone kindly have a look at this? Many thanks in advance

kristiann57 avatar May 17 '24 16:05 kristiann57

You are trying to use a very old (and unsupported) version. Could you try with a newer one.

julienrbrt avatar May 17 '24 18:05 julienrbrt

You are trying to use a very old (and unsupported) version. Could you try with a newer one.

Hi Julien, version of what package do you want me to use? I am using all the versions stated in the tutorial: https://tutorials.cosmos.network/hands-on-exercise/1-ignite-cli/1-ignitecli.html

PLease do let me know,

thanks

kristiann57 avatar May 17 '24 19:05 kristiann57

sorry, my fits time using Git and I think I accidentally closed it. as I said:

Hi Julien, version of what package do you want me to use? I am using all the versions stated in the tutorial: https://tutorials.cosmos.network/hands-on-exercise/1-ignite-cli/1-ignitecli.html

PLease do let me know,

thanks

kristiann57 avatar May 17 '24 19:05 kristiann57

Hi, you should use version v28.x.y. The tutorials present on tutorials.cosmos.network are as well outdated and use an unsupported Cosmos SDK version and Ignite version. Most of the concepts are still valid, but I would suggest you to have a look at https://tutorials.ignite.com/ and https://docs.ignite.com/guide/getting-started instead.

julienrbrt avatar May 31 '24 10:05 julienrbrt