When I use
import (
"go/types"
"go/importer"
)
conf := types.Config{
Importer: importer.For("source", nil),
}
pkg, err := conf.Check(importSpec.Path.Value, fset, files, nil)
This errors on some machines saying
could not import path (Config.Importer not installed)
(see https://golang.org/src/go/types/resolver.go - line 155)
For my usecase I can't use the importer.Default().
Why is this failing on some machines? What can I do to get the source importer on all machines?