简体   繁体   English

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

[英]How to fix '/gobuffalo/buffalo/plugins/plugdeps/plugin.go:15:11: undefined: meta.BuildTags' error after installing gobuffalo

I am running Ubuntu 19.10 and Go 1.13.4.我正在运行 Ubuntu 19.10 和 Go 1.13.4。

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

The error occurs after running the new command to start a project运行新命令启动项目后出现错误

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   

I have tried uninstalling and reinstalling buffalo as well as removing my go directory and recreating everything.我尝试卸载并重新安装 buffalo 以及删除我的 go 目录并重新创建所有内容。 I have also confirmed that my $GOPATH is set properly and it is included in my $PATH.我还确认我的 $GOPATH 设置正确并且它包含在我的 $PATH 中。

As explained here , GOPATH is no longer supported by Buffalo.正如解释这里,GOPATH不再由布法罗支持。 You either need to create your project somewhere else, or explicitly set the GO111MODULE environment variable to on .您要么需要在其他地方创建您的项目,要么将GO111MODULE环境变量显式设置为on

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM