99designs / 99designs/gqlgen

Fail go run github.com/99designs/gqlgen init

未关闭
#2,404 1 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Go
星标
10.8k
派生
1.3k
平均合并
2 天 36 分钟
30 天内合并 PR
26

描述

### What happened?

On mac m1 can not init gqlgen.

### What did you expect?

Tutorial to solve problem

### Init gqlgen

go run github.com/99designs/gqlgen init
Creating gqlgen.yml
Creating graph/schema.graphqls
Creating server.go
Generating...
validation failed: packages.Load: /opt/homebrew/Cellar/go/1.19.2/libexec/src/runtime/cgo/cgo.go:33:8: could not import C (no metadata for C)
/opt/homebrew/Cellar/go/1.19.2/libexec/src/net/cgo_bsd.go:12:8: could not import C (no metadata for C)

### versions
- `go run github.com/99designs/gqlgen version`?
- latest
- `go version`?
- 1.19.2

贡献指南

打开贡献指南

调研方向

错误发生在 macOS M1 上运行 'go run github.com/99designs/gqlgen init' 时,涉及 C 导入问题。首先检查 gqlgen init 命令的代码生成步骤,可能位于 cmd/init.go 或 internal/codegen 包中。检查 M1 上 CGO 的环境设置,并确认该问题是否特定于 Go 版本或 gqlgen 初始化过程。在本地运行 init 命令并跟踪验证失败,有助于确定根本原因。

由索引模型根据 Issue 内容生成。

评估

技术栈
go
领域
cli, developer-experience
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。