diff --git a/modules/client.go b/modules/client.go index 1640e19070f..571ece15ebd 100644 --- a/modules/client.go +++ b/modules/client.go @@ -237,6 +237,12 @@ func (c *Client) Vendor() error { continue } + // See https://github.com/gohugoio/hugo/issues/8239 + // This is an error situation. We need something to vendor. + if t.Mounts() == nil { + return errors.Errorf("cannot vendor module %q, need at least one mount", t.Path()) + } + fmt.Fprintln(&modulesContent, "# "+t.Path()+" "+t.Version()) dir := t.Dir()