The hugo snap binary (v0.58.1 extended) doesn’t seem to like hugo modules:
Error: we found a go.mod file in your project, but you need to install Go to use it. See https://golang.org/dl/.: module "github.com/holehan/hugo-components-matomo" not found; either add it as a Hugo Module or store it in "/..../..../themes".: module does not exist
Of course Go is installed. Testing the same project with the hugo binary from the github releases doesn’t throw any errors.
Anyone care to reproduce?
- Clone project that uses hugo modules, e.g. https://github.com/bep/docuapi.git
- Build project with snap version of hugo
/var/lib/snapd/snap/bin/hugo(mine is on Manjaro Linux)