Skip to Content
marmot
DiagnosticsError codes
example $ marmot build .
error[M0011]: no required module provides package example.com/lib
 --> ./main.go:3:8
  |
3 | import "example.com/lib" // not in go.mod
  |        ^^^^^^^^^^^^^^^^^
  |
  = help: add the module: `go get example.com/lib`

error: build failed with 1 error
for more about an error, run `marmot explain M0011`
The program that produced it
package main

import "example.com/lib" // not in go.mod

func main() {}

The mistake and the fix

The mistake
import "example.com/lib" // not in go.mod
Fixed
// go get example.com/lib, then
import "example.com/lib"

The fix

Run go get for the module, fix the import path, or remove the import.

See also all error codes and marmot explain.

On this page

Was this page helpful?

Report an issueOpen issues