2

我正在运行 Ubuntu 19.10 和 Go 1.13.4。

我按照此处的说明安装了 gobuffalo:https ://gobuffalo.io/en/docs/getting-started/installation#gnu-linux

运行新命令启动项目后出现错误

buffalo new coke
DEBU[2019-12-14T15:41:23-05:00] Step: 5b3c4d92
DEBU[2019-12-14T15:41:23-05:00] Chdir: /home/ramon/go/src/github.com/cabral-ramon/coke
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/.codeclimate.yml
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/.env
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/README.md
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/actions/actions_test.go
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/actions/app.go
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/actions/home.go
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/actions/home_test.go
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/actions/render.go
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/fixtures/sample.toml
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/grifts/init.go
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/inflections.json
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/main.go
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/config/buffalo-app.toml
DEBU[2019-12-14T15:41:23-05:00] Step: 34bd4cfa
DEBU[2019-12-14T15:41:23-05:00] Chdir: /home/ramon/go/src/github.com/cabral-ramon/coke
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/.dockerignore
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/Dockerfile
DEBU[2019-12-14T15:41:23-05:00] Step: ec834ec0
DEBU[2019-12-14T15:41:23-05:00] Chdir: /home/ramon/go/src/github.com/cabral-ramon/coke
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/grifts/db.go
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/models/models.go
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/models/models_test.go
DEBU[2019-12-14T15:41:23-05:00] Exec: go get github.com/gobuffalo/pop
DEBU[2019-12-14T15:41:23-05:00] Step: 85ff7f10
DEBU[2019-12-14T15:41:23-05:00] Chdir: /home/ramon/go/src/github.com/cabral-ramon/coke
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/database.yml
DEBU[2019-12-14T15:41:23-05:00] Step: 5aad8342
DEBU[2019-12-14T15:41:23-05:00] Chdir: /home/ramon/go/src/github.com/cabral-ramon/coke
DEBU[2019-12-14T15:41:23-05:00] File: /home/ramon/go/src/github.com/cabral-ramon/coke/.buffalo.dev.yml
DEBU[2019-12-14T15:41:23-05:00] Step: 95eb8142
DEBU[2019-12-14T15:41:23-05:00] Chdir: /home/ramon/go/src/github.com/cabral-ramon/coke
DEBU[2019-12-14T15:41:23-05:00] Exec: go get github.com/gobuffalo/buffalo-pop
# github.com/gobuffalo/buffalo/plugins/plugdeps
../../gobuffalo/buffalo/plugins/plugdeps/plugin.go:15:11: undefined: meta.BuildTags
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] (default "none")
      --config string        config file (default is $HOME/.buffalo.yaml)
      --db-type string       specify the type of database you want to use [cockroach, 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[0000] Error: exit status 2   

我已经尝试卸载并重新安装 buffalo 以及删除我的 go 目录并重新创建所有内容。我还确认我的 $GOPATH 设置正确,它包含在我的 $PATH 中。

4

1 回答 1

3

如此处所述,Buffalo 不再支持 GOPATH。您要么需要在其他地方创建项目,要么将GO111MODULE环境变量显式设置为on.

于 2019-12-15T09:07:05.823 回答