Search code examples
gogolandgo-modules

Fix GoLand not finding module dependencies ("cannot resolve...")?


I have installed my project's Go module dependencies with go build.

But GoLand is telling me it cannot resolve any of these dependencies.

How can I get GoLand to find the Go module dependencies?


Solution

  • Make sure that you have Go Modules support enabled.

    In your preferences go to Go > Go Modules (vgo) and check "Enable Go Modules":

    enter image description here