遇到go: go.mod file not found in current directory or any parent directory.

go搭建bee或者其他东西的时候遇到问题

go: go.mod file not found in current directory or any parent directory.
        'go get' is no longer supported outside a module.
        To build and install a command, use 'go install' with a version,
        like 'go install example.com/cmd@latest'
        For more information, see https://golang.org/doc/go-get-install-deprecation
        or run 'go help get' or 'go help install'.

这个问题解决方式

输入:

  1. go env -w GO111MODULE=on

  2. go env -w GOPROXY=https://goproxy.cn,direct

之后在进行命令就可以啦!

扫描二维码关注公众号,回复: 14518010 查看本文章

猜你喜欢

转载自blog.csdn.net/qq_57309855/article/details/126505722