win11 编译出错,请老师指教
Rockyzsu opened this issue · comments
Win11
go 1.21.3 windows/amd64
go build
github.com/smacker/go-tree-sitter/javascript: build constraints exclude all Go files in C:\Users\yagam\go\pkg\mod\github.com\smacker\go-tree-sitter@v0.0.0-20231219031718-233c2f923ac7\javascript
github.com/smacker/go-tree-sitter
C:\Users\yagam\go\pkg\mod\github.com\smacker\go-tree-sitter@v0.0.0-20231219031718-233c2f923ac7\iter.go:17:18: undefined: Node
C:\Users\yagam\go\pkg\mod\github.com\smacker\go-tree-sitter@v0.0.0-20231219031718-233c2f923ac7\iter.go:21:21: undefined: Node
C:\Users\yagam\go\pkg\mod\github.com\smacker\go-tree-sitter@v0.0.0-20231219031718-233c2f923ac7\iter.go:25:20: undefined: Node
C:\Users\yagam\go\pkg\mod\github.com\smacker\go-tree-sitter@v0.0.0-20231219031718-233c2f923ac7\iter.go:30:26: undefined: Node
C:\Users\yagam\go\pkg\mod\github.com\smacker\go-tree-sitter@v0.0.0-20231219031718-233c2f923ac7\iter.go:34:20: undefined: Node
C:\Users\yagam\go\pkg\mod\github.com\smacker\go-tree-sitter@v0.0.0-20231219031718-233c2f923ac7\iter.go:38:32: undefined: Node
C:\Users\yagam\go\pkg\mod\github.com\smacker\go-tree-sitter@v0.0.0-20231219031718-233c2f923ac7\iter.go:43:9: undefined: Node
C:\Users\yagam\go\pkg\mod\github.com\smacker\go-tree-sitter@v0.0.0-20231219031718-233c2f923ac7\iter.go:46:18: undefined: Node
C:\Users\yagam\go\pkg\mod\github.com\smacker\go-tree-sitter@v0.0.0-20231219031718-233c2f923ac7\iter.go:68:40: undefined: Node
需要开启 CGO_ENABLED , go env 你看看这个值是不是 1 , 并且 Windows 下需要安装 MinGW
releases 中的这个编译好的应该可以用,放心使用,这个是 github action 自动编译好的,https://github.com/yhy0/Jie/releases/download/v1.0.0/Jie_1.0.0_windows_amd64.zip