Go.mod file not found in current directory error

hello people total noob here. got this specific error

Starting: C:\Users\876HolyZero\go\bin\dlv.exe dap --listen=127.0.0.1:58417 from c:\Users\876HolyZero

DAP server listening at: 127.0.0.1:58417

Build Error: go build -o c:\Users\876HolyZero__debug_bin2634387567.exe -gcflags all=-N -l . go: go.mod file not found in current directory or any parent directory; see ‘go help modules’ (exit status 1)

how do i fix this?

Hi @876HolyZero, welcome to the forum.

This error sounds strange to me. Can you share more about the context of this error:

  1. I assume you do have a go.mod file at c:\Users\876HolyZero, correct?
  2. What is the role of Delve here? Does the error only happen with dlv, or even only with dlv dap? In other words, does a plain go build without dlv dap succeed?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.