goland
$GOPATH/go.mod exists but should not

1.可能是goland go modules没有配置好
按下图配置
setting->go->go modules
$GOPATH/go.mod exists but should not
配置好后先点击右下角的apply,然后再ok,不然保存不上
2.也可以在电脑的环境变量处修改,如下图
$GOPATH/go.mod exists but should not
3.开启模块支持后,并不能与GOPATH共存,所以把项目从$GOPATH中移出即可

相关文章:

  • 2022-12-23
  • 2021-11-04
  • 2021-07-09
  • 2022-12-23
  • 2021-08-10
  • 2022-01-02
  • 2021-06-19
  • 2021-11-25
猜你喜欢
  • 2021-08-27
  • 2022-01-08
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2022-02-07
相关资源
相似解决方案