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

build github.com/oxequa/realize: cannot load gopkg.in/urfave/cli.v2 #253

Open
keitakn opened this issue Sep 16, 2019 · 23 comments
Open

build github.com/oxequa/realize: cannot load gopkg.in/urfave/cli.v2 #253

keitakn opened this issue Sep 16, 2019 · 23 comments

Comments

@keitakn
Copy link

keitakn commented Sep 16, 2019

Hi,

When I run go get -u github.com/oxequa/realize I got the following error

build github.com/oxequa/realize: cannot load gopkg.in/urfave/cli.v2: cannot find module providing package gopkg.in/urfave/cli.v2

My Dockerfile

FROM golang:1.13.0-alpine3.10 as build

WORKDIR /go/app

COPY . .

RUN set -ex && \
  apk update && \
  apk add --no-cache git && \
  go build -o portfolio-backend && \
  go get -u github.com/oxequa/realize && \
  go get -u github.com/go-delve/delve/cmd/dlv && \
  go build -o /go/bin/dlv github.com/go-delve/delve/cmd/dlv

FROM alpine:3.10

WORKDIR /app

COPY --from=build /go/app/portfolio-backend .

RUN set -x && \
  addgroup go && \
  adduser -D -G go go && \
  chown -R go:go /app/portfolio-backend

CMD ["./portfolio-backend"]

Result Log

+ go get -u github.com/oxequa/realize
go: finding github.com/oxequa/realize v2.0.2+incompatible
go: downloading github.com/oxequa/realize v2.0.2+incompatible
go: extracting github.com/oxequa/realize v2.0.2+incompatible
go: downloading golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2
go: finding github.com/oxequa/interact latest
go: finding gopkg.in/urfave/cli.v2 v2.0.0-alpha.2
go: finding github.com/sirupsen/logrus v1.4.2
go: finding github.com/go-siris/siris v7.4.0+incompatible
go: finding github.com/fsnotify/fsnotify v1.4.7
go: finding github.com/fatih/color v1.7.0
go: finding gopkg.in/yaml.v2 v2.2.2
go: finding github.com/labstack/echo v3.3.10+incompatible
go: downloading github.com/go-siris/siris v7.4.0+incompatible
go: downloading github.com/sirupsen/logrus v1.4.2
go: downloading github.com/fsnotify/fsnotify v1.4.7
go: downloading github.com/fatih/color v1.7.0
go: downloading gopkg.in/yaml.v2 v2.2.2
go: downloading github.com/labstack/echo v3.3.10+incompatible
go: extracting golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2
go: extracting github.com/fatih/color v1.7.0
go: extracting gopkg.in/yaml.v2 v2.2.2
go: downloading github.com/oxequa/interact v0.0.0-20171114182912-f8fb5795b5d7
go: extracting github.com/fsnotify/fsnotify v1.4.7
go: extracting github.com/labstack/echo v3.3.10+incompatible
go: extracting github.com/sirupsen/logrus v1.4.2
go: extracting github.com/go-siris/siris v7.4.0+incompatible
go: extracting github.com/oxequa/interact v0.0.0-20171114182912-f8fb5795b5d7
go: finding gopkg.in/urfave/cli.v2 v2.0.0-alpha.2
go: downloading github.com/konsorten/go-windows-terminal-sequences v1.0.1
go: extracting github.com/konsorten/go-windows-terminal-sequences v1.0.1
go: downloading golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: finding github.com/labstack/gommon v0.3.0
go: downloading github.com/labstack/gommon v0.3.0
go: extracting github.com/labstack/gommon v0.3.0
go: downloading golang.org/x/sys v0.0.0-20190422165155-953cdadca894
go: finding github.com/valyala/fasttemplate v1.0.1
go: finding github.com/satori/go.uuid v1.2.0
go: finding github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: finding github.com/mattn/go-colorable v0.1.2
go: finding github.com/mattn/go-isatty v0.0.9
go: downloading github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: downloading github.com/mattn/go-isatty v0.0.9
go: downloading github.com/satori/go.uuid v1.2.0
go: downloading github.com/valyala/fasttemplate v1.0.1
go: extracting golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: extracting github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: extracting github.com/satori/go.uuid v1.2.0
go: extracting github.com/valyala/fasttemplate v1.0.1
go: downloading github.com/mattn/go-colorable v0.1.2
go: extracting github.com/mattn/go-isatty v0.0.9
go: extracting github.com/mattn/go-colorable v0.1.2
go: extracting golang.org/x/sys v0.0.0-20190422165155-953cdadca894
go: downloading golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
go: downloading github.com/valyala/bytebufferpool v1.0.0
go: extracting github.com/valyala/bytebufferpool v1.0.0
go: extracting golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
go: finding golang.org/x/net latest
go: finding github.com/valyala/bytebufferpool v1.0.0
go: finding golang.org/x/crypto latest
go: finding golang.org/x/sys latest
go: finding github.com/konsorten/go-windows-terminal-sequences v1.0.2
go: downloading golang.org/x/sys v0.0.0-20190913121621-c3b328c6e5a7
go: downloading golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7
go: downloading github.com/konsorten/go-windows-terminal-sequences v1.0.2
go: extracting github.com/konsorten/go-windows-terminal-sequences v1.0.2
go: extracting golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7
go: downloading golang.org/x/text v0.3.0
go: extracting golang.org/x/sys v0.0.0-20190913121621-c3b328c6e5a7
go: extracting golang.org/x/text v0.3.0
go: finding golang.org/x/text v0.3.2
go: downloading golang.org/x/text v0.3.2
go: extracting golang.org/x/text v0.3.2
build github.com/oxequa/realize: cannot load gopkg.in/urfave/cli.v2: cannot find module providing package gopkg.in/urfave/cli.v2
@PKuebler
Copy link

same here.

@DrudgeRajen
Copy link

same here

@ThanadetManichote
Copy link

me too.

@aksentyev
Copy link

aksentyev commented Sep 16, 2019

you can do go get gopkg.in/urfave/cli.v2@master before go get github.com/oxequa/realize as a workaround :)

@keitakn
Copy link
Author

keitakn commented Sep 16, 2019

you can do go get gopkg.in/urfave/cli.v2@master before go get -u github.com/oxequa/realize as a workaround :)

Thank you for telling us.

I tried it. However, the following error occurred:

+ go get gopkg.in/urfave/cli.v2@master
go: finding gopkg.in/urfave/cli.v2 master
go: finding gopkg.in master
go: downloading gopkg.in/urfave/cli.v2 v2.0.0-20190806201727-b62605953717
go: extracting gopkg.in/urfave/cli.v2 v2.0.0-20190806201727-b62605953717
+ go get -u github.com/oxequa/realize
go: finding github.com/oxequa/realize v2.0.2+incompatible
go: downloading github.com/oxequa/realize v2.0.2+incompatible
go: extracting github.com/oxequa/realize v2.0.2+incompatible
go: downloading golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2
go: finding github.com/oxequa/interact latest
go: finding github.com/go-siris/siris v7.4.0+incompatible
go: finding github.com/fsnotify/fsnotify v1.4.7
go: finding github.com/labstack/echo v3.3.10+incompatible
go: finding github.com/fatih/color v1.7.0
go: finding gopkg.in/yaml.v2 v2.2.2
go: downloading github.com/oxequa/interact v0.0.0-20171114182912-f8fb5795b5d7
go: downloading github.com/go-siris/siris v7.4.0+incompatible
go: finding github.com/sirupsen/logrus v1.4.2
go: downloading github.com/fsnotify/fsnotify v1.4.7
go: downloading github.com/fatih/color v1.7.0
go: downloading gopkg.in/yaml.v2 v2.2.2
go: downloading github.com/labstack/echo v3.3.10+incompatible
go: downloading github.com/sirupsen/logrus v1.4.2
go: extracting golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2
go: extracting github.com/oxequa/interact v0.0.0-20171114182912-f8fb5795b5d7
go: extracting github.com/fsnotify/fsnotify v1.4.7
go: extracting github.com/go-siris/siris v7.4.0+incompatible
go: extracting github.com/fatih/color v1.7.0
go: extracting github.com/labstack/echo v3.3.10+incompatible
go: extracting github.com/sirupsen/logrus v1.4.2
go: extracting gopkg.in/yaml.v2 v2.2.2
go: downloading golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: downloading github.com/konsorten/go-windows-terminal-sequences v1.0.1
go: downloading golang.org/x/sys v0.0.0-20190422165155-953cdadca894
go: finding github.com/labstack/gommon v0.3.0
go: extracting github.com/konsorten/go-windows-terminal-sequences v1.0.1
go: finding github.com/satori/go.uuid v1.2.0
go: finding github.com/mattn/go-isatty v0.0.9
go: downloading github.com/labstack/gommon v0.3.0
go: finding github.com/mattn/go-colorable v0.1.2
go: finding github.com/valyala/fasttemplate v1.0.1
go: downloading github.com/satori/go.uuid v1.2.0
go: extracting golang.org/x/sys v0.0.0-20190422165155-953cdadca894
go: downloading github.com/valyala/fasttemplate v1.0.1
go: downloading github.com/mattn/go-isatty v0.0.9
go: downloading github.com/mattn/go-colorable v0.1.2
go: extracting github.com/satori/go.uuid v1.2.0
go: extracting github.com/valyala/fasttemplate v1.0.1
go: extracting github.com/labstack/gommon v0.3.0
go: finding github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: extracting github.com/mattn/go-colorable v0.1.2
go: downloading github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: extracting github.com/mattn/go-isatty v0.0.9
go: extracting github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: extracting golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: downloading golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
go: downloading github.com/valyala/bytebufferpool v1.0.0
go: extracting github.com/valyala/bytebufferpool v1.0.0
go: extracting golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
go: finding golang.org/x/crypto latest
go: finding github.com/konsorten/go-windows-terminal-sequences v1.0.2
go: finding github.com/valyala/bytebufferpool v1.0.0
go: finding gopkg.in/urfave/cli.v2 v2.0.0-alpha.2
go: finding golang.org/x/sys latest
go: finding golang.org/x/net latest
go: finding gopkg.in/urfave/cli.v2 v2.0.0-alpha.2
go get: upgrading gopkg.in/urfave/cli.v2@v2.0.0-20190806201727-b62605953717: gopkg.in/urfave/cli.v2@v2.0.0-alpha.2: invalid version: go.mod has non-....v2 module path "github.com/urfave/cli/v2" at revision v2.0.0-alpha.2

@aksentyev
Copy link

aksentyev commented Sep 16, 2019

@keitakn try without -u option
go get github.com/oxequa/realize

@yyh-gl
Copy link
Contributor

yyh-gl commented Sep 17, 2019

I try go get gopkg.in/urfave/cli.v2@master before go get github.com/oxequa/realize.
I was able to get realize without a problem.
thanks!

@ajones
Copy link

ajones commented Sep 17, 2019

I tried the above
go get gopkg.in/urfave/cli.v2@master before go get github.com/oxequa/realize
and am still experiencing the same proglem

Step 6/15 : RUN apk add bash ca-certificates git openssh-client postgresql     && git config --global url."https://${GITHUB_ACCESS_TOKEN}:@github.com/".insteadOf "https://github.com/"     && go get gopkg.in/urfave/cli.v2@master     && go get github.com/oxequa/realize     && echo "Finished downloading dependencies"
 ---> Running in d4d85c1ef47d
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/21) Installing ncurses-terminfo-base (6.1_p20190518-r0)
(2/21) Installing ncurses-terminfo (6.1_p20190518-r0)
(3/21) Installing ncurses-libs (6.1_p20190518-r0)
(4/21) Installing readline (8.0.0-r0)
(5/21) Installing bash (5.0.0-r0)
Executing bash-5.0.0-r0.post-install
(6/21) Installing nghttp2-libs (1.39.2-r0)
(7/21) Installing libcurl (7.65.1-r0)
(8/21) Installing expat (2.2.7-r1)
(9/21) Installing pcre2 (10.33-r0)
(10/21) Installing git (2.22.0-r0)
(11/21) Installing openssh-keygen (8.0_p1-r0)
(12/21) Installing libedit (20190324.3.1-r0)
(13/21) Installing openssh-client (8.0_p1-r0)
(14/21) Installing db (5.3.28-r1)
(15/21) Installing libsasl (2.1.27-r3)
(16/21) Installing libldap (2.4.48-r0)
(17/21) Installing libpq (11.5-r1)
(18/21) Installing postgresql-client (11.5-r1)
(19/21) Installing tzdata (2019b-r0)
(20/21) Installing libxml2 (2.9.9-r2)
(21/21) Installing postgresql (11.5-r1)
Executing busybox-1.30.1-r2.trigger
OK: 54 MiB in 36 packages
go: finding gopkg.in/urfave/cli.v2 master
go: downloading gopkg.in/urfave/cli.v2 v2.0.0-20190806201727-b62605953717
go: extracting gopkg.in/urfave/cli.v2 v2.0.0-20190806201727-b62605953717
go: finding github.com/oxequa/realize v2.0.2+incompatible
go: downloading github.com/oxequa/realize v2.0.2+incompatible
go: extracting github.com/oxequa/realize v2.0.2+incompatible
go: finding github.com/oxequa/interact latest
go: finding github.com/go-siris/siris/core/errors latest
go: finding github.com/fatih/color v1.7.0
go: finding github.com/fsnotify/fsnotify v1.4.7
go: finding github.com/sirupsen/logrus v1.4.2
go: finding github.com/labstack/echo/middleware latest
go: downloading github.com/oxequa/interact v0.0.0-20171114182912-f8fb5795b5d7
go: extracting github.com/oxequa/interact v0.0.0-20171114182912-f8fb5795b5d7
go: downloading github.com/fsnotify/fsnotify v1.4.7
go: downloading github.com/sirupsen/logrus v1.4.2
go: extracting github.com/fsnotify/fsnotify v1.4.7
go: extracting github.com/sirupsen/logrus v1.4.2
go: finding gopkg.in/urfave/cli.v2 v2.0.0-alpha.2
go: finding gopkg.in/yaml.v2 v2.2.2
go: downloading gopkg.in/urfave/cli.v2 v2.0.0-alpha.2
go: downloading github.com/fatih/color v1.7.0
go: extracting github.com/fatih/color v1.7.0
go: finding golang.org/x/net/websocket latest
go: downloading gopkg.in/yaml.v2 v2.2.2
go: extracting gopkg.in/yaml.v2 v2.2.2
go: finding github.com/labstack/echo v3.3.10+incompatible
go: downloading github.com/labstack/echo v3.3.10+incompatible
go: finding github.com/go-siris/siris/core latest
go: extracting github.com/labstack/echo v3.3.10+incompatible
go: finding golang.org/x/net latest
go: downloading golang.org/x/net v0.0.0-20190916140828-c8589233b77d
go: extracting golang.org/x/net v0.0.0-20190916140828-c8589233b77d
go: finding github.com/go-siris/siris v7.4.0+incompatible
go: downloading github.com/go-siris/siris v7.4.0+incompatible
go: extracting github.com/go-siris/siris v7.4.0+incompatible
go: finding github.com/konsorten/go-windows-terminal-sequences v1.0.1
go: finding github.com/davecgh/go-spew v1.1.1
go: finding github.com/stretchr/objx v0.1.1
go: finding github.com/stretchr/testify v1.2.2
go: finding github.com/pmezard/go-difflib v1.0.0
go: finding gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
go: finding golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
go: finding golang.org/x/sys v0.0.0-20190422165155-953cdadca894
go: finding golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: finding golang.org/x/text v0.3.0
go: downloading golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: downloading golang.org/x/sys v0.0.0-20190422165155-953cdadca894
go: finding github.com/satori/go.uuid v1.2.0
go: finding github.com/valyala/fasttemplate v1.0.1
go: finding github.com/mattn/go-isatty v0.0.9
go: finding github.com/mattn/go-colorable v0.1.2
go: finding github.com/labstack/gommon/random latest
go: finding github.com/labstack/gommon/bytes latest
go: finding github.com/labstack/gommon/log latest
go: extracting golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: finding github.com/labstack/gommon/color latest
go: downloading github.com/valyala/fasttemplate v1.0.1
go: downloading github.com/satori/go.uuid v1.2.0
go: extracting github.com/valyala/fasttemplate v1.0.1
go: downloading github.com/mattn/go-isatty v0.0.9
go: downloading github.com/mattn/go-colorable v0.1.2
go: extracting github.com/satori/go.uuid v1.2.0
go: finding github.com/labstack/gommon v0.3.0
go: extracting github.com/mattn/go-isatty v0.0.9
go: extracting github.com/mattn/go-colorable v0.1.2
go: downloading github.com/labstack/gommon v0.3.0
go: extracting github.com/labstack/gommon v0.3.0
go: finding github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: downloading github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: extracting github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: extracting golang.org/x/sys v0.0.0-20190422165155-953cdadca894
go: finding github.com/mattn/go-isatty v0.0.8
go: finding github.com/stretchr/testify v1.4.0
go: finding golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
go: finding github.com/valyala/bytebufferpool v1.0.0
go: finding golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223
go: finding github.com/davecgh/go-spew v1.1.0
go: finding github.com/stretchr/objx v0.1.0
go: downloading golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
go: downloading github.com/valyala/bytebufferpool v1.0.0
go: extracting github.com/valyala/bytebufferpool v1.0.0
go: extracting golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
build github.com/oxequa/realize: cannot load gopkg.in/urfave/cli.v2: cannot find module providing package gopkg.in/urfave/cli.v2

Docker file

FROM golang:1.12-alpine AS build_base
ENV GO111MODULE=on GOOS=linux GOARCH=amd64
ARG GITHUB_ACCESS_TOKEN
ARG SERVICE_NAME
RUN apk add bash ca-certificates git openssh-client postgresql \
    && git config --global url."https://${GITHUB_ACCESS_TOKEN}:@github.com/".insteadOf "https://github.com/" \
    && go get gopkg.in/urfave/cli.v2@master \
    && go get github.com/oxequa/realize

keitakn added a commit to nekochans/portfolio-backend that referenced this issue Sep 17, 2019
- "ENV GO111MODULE on" がデフォルトで有効になったので明示的に記載するのをやめた
- realizeをgo getする際に問題が発生したのでgopkg.in/urfave/cli.v2を別途追加するように改修

oxequa/realize#253
@keitakn
Copy link
Author

keitakn commented Sep 17, 2019

@keitakn try without -u option
go get github.com/oxequa/realize

@aksentyev
Thank you. I did it well the way you taught me.

My Dockerfile

FROM golang:1.13.0-alpine3.10 as build

WORKDIR /go/app

COPY . .

RUN set -ex && \
  apk update && \
  apk add --no-cache git && \
  go build -o portfolio-backend && \
  go get gopkg.in/urfave/cli.v2@master && \
  go get github.com/oxequa/realize && \
  go get -u github.com/go-delve/delve/cmd/dlv && \
  go build -o /go/bin/dlv github.com/go-delve/delve/cmd/dlv

FROM alpine:3.10

WORKDIR /app

COPY --from=build /go/app/portfolio-backend .

RUN set -x && \
  addgroup go && \
  adduser -D -G go go && \
  chown -R go:go /app/portfolio-backend

CMD ["./portfolio-backend"]

@inductor
Copy link

I got the exact same issue and go get gopkg.in/urfave/cli.v2@master worked for me. But I believe this is just a workaround and hope to get it to be fixed

@ajones
Copy link

ajones commented Sep 18, 2019

For those of you still encountering the issue after trying the suggestions above here is the cause and solution.

To begin realize does not use go modules. This means if you call go get gopkg.in/urfave/cli.v2@master from inside a project with go modules enabled the resulting package is installed to pkg/mod/.... Then when realize is installed (because it does not use mods) it will not check the location installed to by go modules. This causes a request to the network for cli.v2 regardless of the -u option provided. To circumvent this you must install realize from a go package NOT using go modules.
To be able to allow our package to use modules and still utilize realize we made the following change to our dockerfile

From

FROM golang:1.12-alpine AS build_base
ENV GO111MODULE=on GOOS=linux GOARCH=amd64
ARG GITHUB_ACCESS_TOKEN
ARG SERVICE_NAME
RUN apk add bash ca-certificates git openssh-client postgresql \
    && git config --global url."https://${GITHUB_ACCESS_TOKEN}:@github.com/".insteadOf "https://github.com/" \
    && go get gopkg.in/urfave/cli.v2@master \
    && go get github.com/oxequa/realize

To

FROM golang:1.12-alpine AS build_base
ARG GITHUB_ACCESS_TOKEN
ARG SERVICE_NAME
WORKDIR /go/src/github.com/calm/${SERVICE_NAME}
RUN apk add build-base bash ca-certificates git openssh-client postgresql \
    && git config --global url."https://${GITHUB_ACCESS_TOKEN}:@github.com/".insteadOf "https://github.com/"
RUN go get -v gopkg.in/urfave/cli.v2 \
    && go get -v github.com/oxequa/realize \
    && go get -u -v github.com/calm/ssm-env \
    && go get -u -v github.com/onsi/ginkgo/ginkgo \
    && go get -u -v github.com/onsi/gomega \
    && go get -u -v github.com/modocache/gover \
    && go get -u -v github.com/mattn/goveralls \
    && go get -u -v github.com/pressly/goose/cmd/goose \
    && echo "Finished downloading dependencies"
ENV GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64
COPY . .
RUN go mod download 
RUN go build -a -installsuffix cgo -ldflags="-w -s" -o "/go/bin/${SERVICE_NAME}" 
RUN rm -f /root/.gitconfig

Notice the movement of the line

ENV GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64

to below the installation of realize and the addition of

go get -v gopkg.in/urfave/cli.v2 \
&& go get -v github.com/oxequa/realize 

as quoted above.

I hope this will help any of you trying to utilize realize in your project that is using go modules.

@araki-yzrh
Copy link

araki-yzrh commented Sep 25, 2019

@ajones
Thanks!

this

GO111MODULE=on

exists in my env.

so,

$ GO111MODULE=off go get github.com/oxequa/realize 

worked for me.

@grzegorz-zur
Copy link

I fixed the problem on my fork https://github.com/grzegorz-zur/realize

@stanxing
Copy link

@grzegorz-zur It still doesn't work with go modules。My golang version is 1.13.4

go: finding github.com/valyala/bytebufferpool v1.0.0
build github.com/oxequa/realize: cannot load gopkg.in/urfave/cli.v2: cannot find module providing package gopkg.in/urfave/cli.v2

@yyh-gl
Copy link
Contributor

yyh-gl commented Dec 10, 2019

Hi, @stanxing
I think the solution of your problem is here.
#262

@stanxing
Copy link

@stanxing
I think the solution of your problem is [here].(#262)

Thanks, can you merge this pr to your forked project? I want to test it. I think the project has been abandoned

@yyh-gl
Copy link
Contributor

yyh-gl commented Dec 10, 2019

ok, I will do that.

@jessequinn
Copy link

jessequinn commented Jan 6, 2020

i needed to use go get github.com/urfave/cli/v2 to install that package

but i still have the issue of

build github.com/oxequa/realize: cannot load gopkg.in/urfave/cli.v2: cannot find module providing package gopkg.in/urfave/cli.v2

The problem is obvious, but i cannot go get gopkg.in/urfave/cli.v2 as i receive the following error

go get gopkg.in/urfave/cli.v2: gopkg.in/urfave/cli.v2@v2.1.1: invalid version: go.mod has non-....v2 module path "github.com/urfave/cli/v2" at revision v2.1.1

This is probably explained by the fact i am using modules

so in the end the following worked

GO111MODULE=off go get github.com/oxequa/realize

@jasonbronson
Copy link

I fixed it by not being in the directory where I had a go project.

@jojo43
Copy link

jojo43 commented Jan 10, 2020

I added the below line to go.mod and go run github.com/oxequa/realize worked fine.

replace gopkg.in/urfave/cli.v2 => github.com/urfave/cli/v2 v2.1.1

@aidooyaw1992
Copy link

replace gopkg.in/urfave/cli.v2 => github.com/urfave/cli/v2 v2.1.1

this worked for me

@danchengash
Copy link

$go get -v github.com/urfave/cli/ && go get -v github.com/oxequa/realize go: added github.com/urfave/cli v1.22.10 go: upgraded github.com/urfave/cli/v2 v2.1.1 => v2.23.7 go: downloading gopkg.in/yaml.v2 v2.2.2 github.com/oxequa/realize imports gopkg.in/urfave/cli.v2: cannot find module providing package gopkg.in/urfave/cli.v2

Still getting the same error because of the import

@rtacconi
Copy link

rtacconi commented May 1, 2023

I am still getting:

github.com/oxequa/realize imports
gopkg.in/urfave/cli.v2: cannot find module providing package gopkg.in/urfave/cli.v2

with go 1.9

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