gobuffalo/buffalo

undefined: uuid.NewV2

ehayun opened this issue · 3 comments

Description

I have this problem when I am running buffalo dev after running this 2 commands (as I find in the doc)

buffalo plugins install github.com/gobuffalo/buffalo-auth
buffalo g auth

on a fresh new buffalo app

Steps to Reproduce the Problem

  1. create a new buffalo app
  2. run the above 2 commands
  3. run go get ./...
  4. run buffalo dev

Expected Behavior

It suppose to run as is without errors

Actual Behavior

I go an error

buffalo: 2022/05/04 06:12:52 === Error! ===
buffalo: 2022/05/04 06:12:52 === exit status 2
github.com/gobuffalo/uuid
# github.com/gobuffalo/uuid
../../go/pkg/mod/github.com/gobuffalo/uuid@v2.0.5+incompatible/generator.go:32:19: undefined: uuid.NewV2
../../go/pkg/mod/github.com/gobuffalo/uuid@v2.0.5+incompatible/uuid.go:41:13: undefined: uuid.V2
 ===

Info

-> Go: Checking installation
✓ The `go` executable was found on your system at: /usr/bin/go

-> Go: Checking minimum version requirements
✓ Your version of Go, 1.17.7, meets the minimum requirements.

-> Go: Checking Package Management
✓ You are using Go Modules (`go`) for package management.

-> Go: Checking PATH
✓ Your PATH contains /home/eli/go/bin.

-> Node: Checking installation
✓ The `node` executable was found on your system at: /usr/bin/node

-> Node: Checking minimum version requirements
✓ Your version of Node, v17.9.0, meets the minimum requirements.

-> NPM: Checking installation
✓ The `npm` executable was found on your system at: /usr/bin/npm

-> NPM: Checking minimum version requirements
✓ Your version of NPM, 8.5.5, meets the minimum requirements.

-> Yarn: Checking installation
✓ The `yarnpkg` executable was found on your system at: /usr/bin/yarnpkg

-> Yarn: Checking minimum version requirements
✓ Your version of Yarn, 1.22.18, meets the minimum requirements.

-> PostgreSQL: Checking installation
✓ The `postgres` executable was found on your system at: /usr/bin/postgres

-> PostgreSQL: Checking minimum version requirements
✓ Your version of PostgreSQL, 14.2.0, meets the minimum requirements.

-> MySQL: Checking installation
✘ The `mysql` executable could not be found on your system.
For help setting up your MySQL environment please follow the instructions for you platform at:

https://www.mysql.com/downloads/

-> SQLite3: Checking installation
✓ The `sqlite3` executable was found on your system at: /usr/bin/sqlite3

-> SQLite3: Checking minimum version requirements
✓ Your version of SQLite3, 3.38.3, meets the minimum requirements.

-> Cockroach: Checking installation
✘ The `cockroach` executable could not be found on your system.
For help setting up your Cockroach environment please follow the instructions for you platform at:

https://www.cockroachlabs.com/docs/stable/

-> Buffalo (CLI): Checking installation
✓ The `buffalo` executable was found on your system at: /usr/local/bin/buffalo

-> Buffalo (CLI): Checking minimum version requirements
✓ Your version of Buffalo (CLI), v0.18.3, meets the minimum requirements.

-> Buffalo: Application Details
Pwd         /home/eli/tmp/justice
Root        /home/eli/tmp/justice
GoPath      /home/eli/go
PackagePkg  justice
ActionsPkg  justice/actions
ModelsPkg   justice/models
GriftsPkg   justice/grifts
WithModules true
Name        justice
Bin         bin/justice
VCS         git
WithPop     true
WithSQLite  false
WithDep     false
WithWebpack true
WithNodeJs  true
WithYarn    false
WithDocker  false
WithGrifts  true
AsWeb       true
AsAPI       false
InApp       true
PackageJSON {map[build:webpack --mode production --progress dev:webpack --watch]}

-> Buffalo: config/buffalo-app.toml
name = "justice"
bin = "bin/justice"
vcs = "git"
with_pop = true
with_sqlite = false
with_dep = false
with_webpack = true
with_nodejs = true
with_yarn = false
with_docker = false
with_grifts = true
as_web = true
as_api = false

-> Buffalo: config/buffalo-plugins.toml
[[plugin]]
  binary = "buffalo-auth"
  go_get = "github.com/gobuffalo/buffalo-auth@latest"

[[plugin]]
  binary = "buffalo-pop"
  go_get = "github.com/gobuffalo/buffalo-pop/v3@latest"

-> Buffalo: go.mod
module justice

go 1.18

require (
	github.com/gobuffalo/buffalo v0.18.6
	github.com/gobuffalo/buffalo-pop/v3 v3.0.3
	github.com/gobuffalo/envy v1.10.1
	github.com/gobuffalo/mw-csrf v1.0.0
	github.com/gobuffalo/mw-forcessl v0.0.0-20200131175327-94b2bd771862
	github.com/gobuffalo/mw-i18n/v2 v2.0.1
	github.com/gobuffalo/mw-paramlogger v1.0.0
	github.com/gobuffalo/pop v4.13.1+incompatible
	github.com/gobuffalo/pop/v6 v6.0.2
	github.com/gobuffalo/suite/v4 v4.0.2
	github.com/gobuffalo/validate v2.0.3+incompatible
	github.com/gofrs/uuid v4.2.0+incompatible
	github.com/markbates/grift v1.5.0
	github.com/pkg/errors v0.9.1
	github.com/unrolled/secure v1.10.0
	golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871
)

require (
	github.com/BurntSushi/toml v1.1.0 // indirect
	github.com/Masterminds/semver/v3 v3.1.1 // indirect
	github.com/aymerick/douceur v0.2.0 // indirect
	github.com/cockroachdb/cockroach-go v0.0.0-20190916165215-ad57a61cc915 // indirect
	github.com/davecgh/go-spew v1.1.1 // indirect
	github.com/dustin/go-humanize v1.0.0 // indirect
	github.com/fatih/color v1.13.0 // indirect
	github.com/fatih/structs v1.1.0 // indirect
	github.com/felixge/httpsnoop v1.0.1 // indirect
	github.com/fsnotify/fsnotify v1.5.1 // indirect
	github.com/go-sql-driver/mysql v1.6.0 // indirect
	github.com/gobuffalo/events v1.4.2 // indirect
	github.com/gobuffalo/fizz v1.14.0 // indirect
	github.com/gobuffalo/flect v0.2.5 // indirect
	github.com/gobuffalo/genny v0.6.0 // indirect
	github.com/gobuffalo/github_flavored_markdown v1.1.1 // indirect
	github.com/gobuffalo/helpers v0.6.4 // indirect
	github.com/gobuffalo/httptest v1.5.1 // indirect
	github.com/gobuffalo/logger v1.0.6 // indirect
	github.com/gobuffalo/meta v0.3.1 // indirect
	github.com/gobuffalo/nulls v0.4.1 // indirect
	github.com/gobuffalo/packd v1.0.1 // indirect
	github.com/gobuffalo/plush/v4 v4.1.10 // indirect
	github.com/gobuffalo/tags/v3 v3.1.2 // indirect
	github.com/gobuffalo/uuid v2.0.5+incompatible // indirect
	github.com/gobuffalo/validate/v3 v3.3.1 // indirect
	github.com/gorilla/css v1.0.0 // indirect
	github.com/gorilla/handlers v1.5.1 // indirect
	github.com/gorilla/mux v1.8.0 // indirect
	github.com/gorilla/securecookie v1.1.1 // indirect
	github.com/gorilla/sessions v1.2.1 // indirect
	github.com/inconshreveable/mousetrap v1.0.0 // indirect
	github.com/jackc/chunkreader/v2 v2.0.1 // indirect
	github.com/jackc/pgconn v1.11.0 // indirect
	github.com/jackc/pgio v1.0.0 // indirect
	github.com/jackc/pgpassfile v1.0.0 // indirect
	github.com/jackc/pgproto3/v2 v2.2.0 // indirect
	github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
	github.com/jackc/pgtype v1.10.0 // indirect
	github.com/jackc/pgx/v4 v4.15.0 // indirect
	github.com/jmoiron/sqlx v1.3.4 // indirect
	github.com/joho/godotenv v1.4.0 // indirect
	github.com/karrick/godirwalk v1.16.1 // indirect
	github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
	github.com/lib/pq v1.10.5 // indirect
	github.com/luna-duclos/instrumentedsql v1.1.3 // indirect
	github.com/markbates/oncer v1.0.0 // indirect
	github.com/markbates/refresh v1.12.0 // indirect
	github.com/markbates/safe v1.0.1 // indirect
	github.com/mattn/go-colorable v0.1.12 // indirect
	github.com/mattn/go-isatty v0.0.14 // indirect
	github.com/mattn/go-sqlite3 v1.14.9 // indirect
	github.com/microcosm-cc/bluemonday v1.0.16 // indirect
	github.com/mitchellh/go-homedir v1.1.0 // indirect
	github.com/monoculum/formam v3.5.5+incompatible // indirect
	github.com/nicksnyder/go-i18n v1.10.1 // indirect
	github.com/pelletier/go-toml v1.9.4 // indirect
	github.com/pmezard/go-difflib v1.0.0 // indirect
	github.com/rogpeppe/go-internal v1.8.0 // indirect
	github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516 // indirect
	github.com/sergi/go-diff v1.2.0 // indirect
	github.com/sirupsen/logrus v1.8.1 // indirect
	github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d // indirect
	github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e // indirect
	github.com/spf13/cobra v1.4.0 // indirect
	github.com/spf13/pflag v1.0.5 // indirect
	github.com/stretchr/testify v1.7.1 // indirect
	golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
	golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
	golang.org/x/sys v0.0.0-20211205182925-97ca703d548d // indirect
	golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
	golang.org/x/text v0.3.7 // indirect
	gopkg.in/yaml.v2 v2.4.0 // indirect
	gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)

sio4 commented

The package gobuffalo/uuid was archived and is not used by the buffalo project now.
It seems like the plugin generates unsupported files which refer to old packages.

For a quick approach, even though this is not an official usage of the commend, I think you can try to run buffalo fix on your application then the wrong package references could be fixed. (not all but mostly I think)

After that, you can find which are fixed, and you may be able to fix your issue.

sio4 commented

@paganotoni could you please migrate this issue to buffalo-auth project? It seems like I have no permission for doing that.

Thanks for your answer
I will try