DiagnosticsError codes
M0011 package not found
An imported package is not in the standard library, the main module, or any required module.
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
import "example.com/lib" // not in go.mod// 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.