mylxsw/aidea-server

编译文件报错 cannot load embed: malformed module path "embed": missing dot in first path element

luoyou opened this issue · 1 comments

luoyou commented

master 分支执行 go build -o build/debug/aidea-server cmd/main.go 报错:

build command-line-arguments: cannot load embed: malformed module path "embed": missing dot in first path element

执行 go mod tidy,报错如下:

github.com/mylxsw/aidea-server/internal/ai/baidu imports
        gopkg.in/resty.v1 imports
        golang.org/x/net/publicsuffix imports
        embed: malformed module path "embed": missing dot in first path element
github.com/mylxsw/aidea-server/cmd imports
        github.com/mylxsw/glacier/starter/app imports
        github.com/urfave/cli/v2/altsrc imports
        github.com/BurntSushi/toml imports
        io/fs: malformed module path "io/fs": missing dot in first path element
github.com/mylxsw/aidea-server/cmd imports
        github.com/mylxsw/glacier/starter/app imports
        github.com/urfave/cli/v2/altsrc imports
        github.com/BurntSushi/toml tested by
        github.com/BurntSushi/toml.test imports
        testing/fstest: malformed module path "testing/fstest": missing dot in first path element
mylxsw commented

Go 版本太低,推荐使用最新版的 Golang,或者是按照 go.mod 中的要求,使用 1.20 及以上版本