Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Running "Buffalo new" I get "Error: exit status 2" #2154

Closed
ghost opened this issue Nov 3, 2021 · 4 comments · Fixed by #2155
Closed

Running "Buffalo new" I get "Error: exit status 2" #2154

ghost opened this issue Nov 3, 2021 · 4 comments · Fixed by #2155

Comments

@ghost
Copy link

ghost commented Nov 3, 2021

With the last version of buffalo cli (0.17.5) running the command buffalo new myProject I get:

DEBU[2021-11-03T14:14:34+01:00] Exec: go mod tidy
go: downloading github.com/gobuffalo/mw-i18n v0.0.0-20190129204410-552713a3ebb4
go: downloading github.com/gobuffalo/buffalo v0.15.5
go: downloading github.com/stretchr/testify v1.5.1
go: downloading github.com/nicksnyder/go-i18n v1.10.0
go: downloading github.com/pelletier/go-toml v1.2.0
go: downloading github.com/gorilla/mux v1.7.3
go: downloading github.com/markbates/refresh v1.10.0
go: downloading github.com/monoculum/formam v0.0.0-20191229172733-952f0766a724
go: finding module for package github.com/gobuffalo/suite
go: found github.com/gobuffalo/suite in github.com/gobuffalo/suite v2.8.2+incompatible
DEBU[2021-11-03T14:14:35+01:00] Step: c2c885d9
DEBU[2021-11-03T14:14:35+01:00] Chdir: /home/marcoolimpi/source/ndr/nrd06
Usage:
  buffalo new [name] [flags]

Flags:
      --api                  skip all front-end code and configure for an API server
      --ci-provider string   specify the type of ci file you would like buffalo to generate [none, travis, gitlab-ci, circleci] (default "none")
      --config string        config file (default is $HOME/.buffalo.yaml)
      --db-type string       specify the type of database you want to use [cockroach, mariadb, mysql, postgres] (default "postgres")
      --docker string        specify the type of Docker file to generate [none, multi, standard] (default "multi")
  -d, --dry-run              dry run
  -f, --force                delete and remake if the app already exists
  -h, --help                 help for new
      --module string        specify the root module (package) name. [defaults to 'automatic']
      --skip-config          skips using the config file
      --skip-pop             skips adding pop/soda to your app
      --skip-webpack         skips adding Webpack to your app
      --skip-yarn            use npm instead of yarn for frontend dependencies management
      --vcs string           specify the Version control system you would like to use [none, git, bzr] (default "git")
  -v, --verbose              verbosely print out the go get commands

ERRO[0033] Error: exit status 2

If inside the project folder I run buffalo dev I get this error:

buffalo: 2021/11/03 14:19:54 === Error! ===
buffalo: 2021/11/03 14:19:54 === exit status 2
github.com/gobuffalo/meta
github.com/nicksnyder/go-i18n/i18n/language
# github.com/gobuffalo/meta
../../../.go/pkg/mod/github.com/gobuffalo/[email protected]/app.go:62:5: undefined: envy.Mods
../../../.go/pkg/mod/github.com/gobuffalo/[email protected]/app.go:70:10: undefined: envy.CurrentPackage
nrd06/models
github.com/nicksnyder/go-i18n/i18n/translation
github.com/nicksnyder/go-i18n/i18n/bundle
github.com/nicksnyder/go-i18n/i18n
 ===
@sio4
Copy link
Member

sio4 commented Nov 3, 2021

Confirmed. I deprecated envy.CurrentPackage() and the new version of envy just release. I am working on it so please be patient.

For a quick fix, please follow the instruction below:

  1. edit go.mod and and add following line
replace github.com/gobuffalo/envy => github.com/gobuffalo/envy v1.9.0
  1. run go mod tidy
  2. try buffalo dev again.

@sio4
Copy link
Member

sio4 commented Nov 3, 2021

For the reference: gobuffalo/envy#39

@sio4
Copy link
Member

sio4 commented Nov 3, 2021

Hi @paganotoni,

I just found meta already has v2 but the buffalo uses meta v0.3.0. And it seems like the version was on fix-mods branch. Could you please confirm what and can we rename the branch as something like v1 or v0 so we can easily find it?

By the way, I will try to update buffalo using v2 of meta but I think it needs some more time since I hope we can focus on the current module update job at the same time.

@sio4
Copy link
Member

sio4 commented Nov 3, 2021

I just PRed for this issue.

@paganotoni, Could you please take a look at this issue and PR gobuffalo/meta#10?

paganotoni added a commit to gobuffalo/meta that referenced this issue Nov 6, 2021
updated dependencies for v0 and fixed gobuffalo/buffalo#2154
@paganotoni paganotoni mentioned this issue Nov 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant