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

Cannot find package "github.com/db-journey/migrate/v2" #16

Closed
florentsolt opened this issue Nov 27, 2019 · 5 comments
Closed

Cannot find package "github.com/db-journey/migrate/v2" #16

florentsolt opened this issue Nov 27, 2019 · 5 comments

Comments

@florentsolt
Copy link

$> GOPATH=/tmp go get github.com/db-journey/journey
package github.com/db-journey/migrate/v2: cannot find package "github.com/db-journey/migrate/v2" in any of:
	/usr/local/go/src/github.com/db-journey/migrate/v2 (from $GOROOT)
	/tmp/src/github.com/db-journey/migrate/v2 (from $GOPATH)
package github.com/db-journey/migrate/v2/driver: cannot find package "github.com/db-journey/migrate/v2/driver" in any of:
	/usr/local/go/src/github.com/db-journey/migrate/v2/driver (from $GOROOT)
	/tmp/src/github.com/db-journey/migrate/v2/driver (from $GOPATH)
package github.com/db-journey/migrate/v2/file: cannot find package "github.com/db-journey/migrate/v2/file" in any of:
	/usr/local/go/src/github.com/db-journey/migrate/v2/file (from $GOROOT)
	/tmp/src/github.com/db-journey/migrate/v2/file (from $GOPATH)

$> go version
go version go1.13.4 linux/amd64

@gravis
Copy link
Member

gravis commented Nov 28, 2019

I guess on top of "naming things" and "cache invalidation", we could add "go modules". Sorry for the mess, I tried everything I could, and ended up editing go.mod by hand, and now it seems to work. Could you please retry? thanks

@florentsolt
Copy link
Author

No pb :)
We are almost there, no more issue with go modules, but now this:

/tmp > GOPATH=/tmp go get github.com/db-journey/journey
# github.com/db-journey/journey/commands
src/github.com/db-journey/journey/commands/commands.go:26:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in array or slice literal:
	cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
src/github.com/db-journey/journey/commands/commands.go:30:4: unknown field 'EnvVar' in struct literal of type cli.StringFlag
src/github.com/db-journey/journey/commands/commands.go:32:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in array or slice literal:
	cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
src/github.com/db-journey/journey/commands/commands.go:36:4: unknown field 'EnvVar' in struct literal of type cli.StringFlag
src/github.com/db-journey/journey/commands/cronjobs_commands.go:14:3: cannot use startCommand (type cli.Command) as type *cli.Command in array or slice literal
src/github.com/db-journey/journey/commands/migrate_commands.go:30:3: cannot use createCommand (type cli.Command) as type *cli.Command in array or slice literal
src/github.com/db-journey/journey/commands/migrate_commands.go:31:3: cannot use upCommand (type cli.Command) as type *cli.Command in array or slice literal
src/github.com/db-journey/journey/commands/migrate_commands.go:32:3: cannot use downCommand (type cli.Command) as type *cli.Command in array or slice literal
src/github.com/db-journey/journey/commands/migrate_commands.go:33:3: cannot use resetCommand (type cli.Command) as type *cli.Command in array or slice literal
src/github.com/db-journey/journey/commands/migrate_commands.go:34:3: cannot use redoCommand (type cli.Command) as type *cli.Command in array or slice literal
src/github.com/db-journey/journey/commands/migrate_commands.go:34:3: too many errors

@gravis
Copy link
Member

gravis commented Nov 28, 2019

That's the joy of modules again. You need to use GO111MODULE=on to fetch the right version of urfave/cli. They unfortunately started a new V2 directly in master instead of ./v2 as described here https://blog.golang.org/v2-go-modules.
See urfave/cli#459

@florentsolt
Copy link
Author

You are right, all good now!
Thx.

@coilysiren
Copy link

They unfortunately started a new V2 directly in master instead of ./v2 as described here https://blog.golang.org/v2-go-modules.
See urfave/cli#459

👀 I may be working on exactly that problem => urfave/cli#952

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

3 participants