Comments (23)
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
from realize.
you can do go get gopkg.in/urfave/cli.v2@master
before go get github.com/oxequa/realize
as a workaround :)
from realize.
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!
from realize.
@ajones
Thanks!
this
GO111MODULE=on
exists in my env.
so,
$ GO111MODULE=off go get github.com/oxequa/realize
worked for me.
from realize.
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
from realize.
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.
from realize.
@keitakn try without -u
option
go get github.com/oxequa/realize
from realize.
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
from realize.
I fixed the problem on my fork https://github.com/grzegorz-zur/realize
from realize.
@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
from realize.
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/[email protected]: 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
from realize.
I fixed it by not being in the directory where I had a go project.
from realize.
same here.
from realize.
same here
from realize.
me too.
from realize.
you can do
go get gopkg.in/urfave/cli.v2@master
beforego 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/[email protected]: gopkg.in/urfave/[email protected]: invalid version: go.mod has non-....v2 module path "github.com/urfave/cli/v2" at revision v2.0.0-alpha.2
from realize.
@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"]
from realize.
Hi, @stanxing
I think the solution of your problem is here.
→ #262
from realize.
@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
from realize.
ok, I will do that.
from realize.
replace gopkg.in/urfave/cli.v2 => github.com/urfave/cli/v2 v2.1.1
this worked for me
from realize.
$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
from realize.
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
from realize.
Related Issues (20)
- Question about setting up TDD with Docker.
- changing testfile while realize is running doesn't detect errors
- on window can't work HOT 2
- Support colorized output in executed commands
- Realize is not killing the current app HOT 5
- github.com/labstack/echo Error
- Ability to run a bash command on Reload HOT 2
- Using realize with dockerised go+nginx app HOT 1
- invalid memory address or nil pointer dereference HOT 1
- non-standard import when running realize HOT 2
- [QUESTION]How to setup multiple projects HOT 1
- PATH environment variable got reset if setting env HOT 1
- project dead? HOT 3
- Panic in run phase HOT 1
- Can't get the realize package HOT 4
- Adapt go modules for fixing dependencies HOT 2
- go: github.com/oxequa/realize imports gopkg.in/urfave/cli.v2: gopkg.in/urfave/[email protected]: parsing go.mod: module declares its path as: github.com/urfave/cli/v2 but was required as: gopkg.in/urfave/cli.v2 HOT 4
- it no works! HOT 2
- realize. file upload. No obvious error prompt HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from realize.