Skip to content

Add golang to path for Hugo module resolution #461

@david-waltermire

Description

@david-waltermire

To use Hugo modules, the go executable needs to be on the path.

Without this, the following error will be produced:

2024-05-07 19:13:13 INFO [download-hugo] .hugo-version found
2024-05-07 19:13:13 INFO [download-hugo] Using hugo version in .hugo-version: 0.123.3
2024-05-07 19:13:13 INFO [download-hugo] Downloading hugo version 0.123.3
2024-05-07 19:13:14 INFO [build-hugo] hugo version: $(/tmp/work/hugo version)
2024-05-07 19:13:14 INFO [build-hugo] Building site with hugo
2024-05-07 19:13:15 INFO [build-hugo] Now using node v18.19.1 (npm v10.2.4)
2024-05-07 19:13:15 INFO [build-hugo] Total in 1 ms
2024-05-07 19:13:15 INFO [build-hugo] Error: failed to load modules: failed to download modules: binary with name "go" not found
2024-05-07 19:13:15 ERROR [main] There was a problem running Hugo, see the above logs for details.

Notes

Versions of the Hugo static site generator since v0.56.0 allow the use of uses Go modules for resolving themes and other website artifacts. To use this feature, there is a need to access the go executable to resolve modules and dependencies.

See example go.mod and Hugo config.

Acceptance Criteria

  • Determine next steps and acceptance criteria

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions