oxequa / realize

Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.
GNU General Public License v3.0
4.46k stars 232 forks source link

go: github.com/oxequa/realize imports gopkg.in/urfave/cli.v2: gopkg.in/urfave/cli.v2@v2.2.0: parsing go.mod: module declares its path as: github.com/urfave/cli/v2 but was required as: gopkg.in/urfave/cli.v2 #269

Open chenyongze opened 4 years ago

chenyongze commented 4 years ago

image

➜ go go get github.com/oxequa/realize go: github.com/oxequa/realize upgrade => v2.0.2+incompatible go: finding module for package github.com/oxequa/interact go: finding module for package gopkg.in/urfave/cli.v2 go: finding module for package gopkg.in/yaml.v2 go: finding module for package github.com/go-siris/siris/core/errors go: finding module for package github.com/labstack/echo go: finding module for package github.com/fsnotify/fsnotify go: finding module for package github.com/fatih/color go: finding module for package github.com/sirupsen/logrus go: finding module for package github.com/labstack/echo/middleware go: finding module for package golang.org/x/net/websocket go: found github.com/oxequa/interact in github.com/oxequa/interact v0.0.0-20171114182912-f8fb5795b5d7 go: found gopkg.in/urfave/cli.v2 in gopkg.in/urfave/cli.v2 v2.2.0 go: found github.com/fatih/color in github.com/fatih/color v1.9.0 go: found github.com/fsnotify/fsnotify in github.com/fsnotify/fsnotify v1.4.9 go: found github.com/go-siris/siris/core/errors in github.com/go-siris/siris v7.4.0+incompatible go: found github.com/labstack/echo in github.com/labstack/echo v3.3.10+incompatible go: found github.com/sirupsen/logrus in github.com/sirupsen/logrus v1.6.0 go: found golang.org/x/net/websocket in golang.org/x/net v0.0.0-20200625001655-4c5254603344 go: found gopkg.in/yaml.v2 in gopkg.in/yaml.v2 v2.3.0 go: github.com/oxequa/realize imports gopkg.in/urfave/cli.v2: gopkg.in/urfave/cli.v2@v2.2.0: parsing go.mod: module declares its path as: github.com/urfave/cli/v2 but was required as: gopkg.in/urfave/cli.v2

chenyongze commented 4 years ago

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

mathieucaroff commented 4 years ago

More generally:

# *sh
GO111MODULE=off go get github.com/oxequa/realize

# powershell
$env:GO111MODULE # (to check it does not exist)
$env:GO111MODULE='off'; go get github.com/oxequa/realize
Remove-Item env:GO111MODULE
demeralde commented 2 years ago

Note you can add export GO111MODULE="off" to your .bashrc, .zshrc, or ~/.config/fish/config.fish (depending on your shell).

I'm assuming this won't cause any issues.

kulak commented 1 year ago

The proposed solution does not work in GO 1.20:

GO111MODULE=off go install github.com/oxequa/realize
../go/src/github.com/oxequa/realize/realize/schema.go:8:2: cannot find package "github.com/urfave/cli/v2" in any of:
    /usr/lib/go/src/github.com/urfave/cli/v2 (from $GOROOT)
    /home/user_name/go/src/github.com/urfave/cli/v2 (from $GOPATH)