安装gobuffalo后如何修复'/gobuffalo/buffalo/plugins/plugdeps/plugin.go:15:11:undefined:meta.BuildTags'错误

时间:2019-12-14 21:15:54

标签: go buffalo

我正在运行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中。

1 个答案:

答案 0 :(得分:3)

here所述,布法罗不再支持GOPATH。您要么需要在其他地方创建项目,要么将GO111MODULE环境变量明确设置为on