原文:【go語言】liteide編譯時候報錯: go: cannot find main module; see 'go help modules'

出現這個說明,安裝了go mod,那么久必須生成go mod文件 解決方法: 上面點擊菜單go module init會生成go.mod,也可用命令行實現,即在目錄下執行cmd命令:go mod init 項目名 然后就好了 ...

2021-02-14 13:29 0 1652 推薦指數:

查看詳情

go: cannot find main moduleseego help modules

在指定目錄下go build報錯go: cannot find main module; seego help modules’解決辦法 : go env -w GO111MODULE=off 參考文檔:https://goproxy.io/zh/ 和 https ...

Tue Dec 08 21:39:00 CST 2020 0 1693
vscode go: cannot find main module

hello.go 運行時遇到 go: cannot find main module; see 'go help modules' 解決的方法: 1.設置環境變量 2.在項目根目錄執行命令 在test目錄下,即test模塊 ...

Mon Feb 08 21:20:00 CST 2021 0 945
go 報錯 cannot find module providing package或cannot find main module

cannot find module providing package或cannot find main module 問題解決如果你是使用go mod 管理依賴,首先檢查:項目根目錄有沒有go.mod文件 如果沒有 執行命令go mod init在當前目錄下生成一個go.mod文件 ...

Fri May 22 16:47:00 CST 2020 0 7221
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM