cannot find module providing package或cannot find main module

问题解决
如果你是使用go mod 管理依赖,首先检查:项目根目录有没有go.mod文件

如果没有

执行命令go mod init在当前目录下生成一个go.mod文件

具体参考:Go modules使用步骤

如果使用GoLand开发工具

Settings--Go--Go Modules(vgo)中:

开启Go Modules继承,
配置代理:https://goproxy.io,direct

go 报错  cannot find module providing package或cannot find main module

 

相关文章:

  • 2022-12-23
  • 2017-11-23
  • 2022-01-13
  • 2021-06-09
  • 2021-04-28
  • 2022-12-23
  • 2022-12-23
  • 2021-06-24
猜你喜欢
  • 2021-05-17
  • 2022-12-23
  • 2021-12-24
  • 2022-12-23
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案