gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 04:21:15 33 4
gpt4 key购买 nike

我运行的是 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 中。

最佳答案

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

关于go - 安装gobuffalo后如何修复 '/gobuffalo/buffalo/plugins/plugdeps/plugin.go:15:11: undefined: meta.BuildTags'错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59339215/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com