hinode
hinode copied to clipboard
[BUG] Vendoring of modules in exampleSite produces invalid modules.txt
Describe the bug
Vendoring the modules of Hinode's example site creates an invalid module list.
To reproduce
Steps to reproduce the behavior:
git clone https://github.com/gethinode/hinode.git
cd hinode/exampleSite
hugo mod vendor
hugo server
Log file
Error: command error: failed to load modules: invalid modules list: "[...]/hinode/exampleSite/_vendor/modules.txt"
Host environment
- Hinode version:
HEAD, commit c099bfdb8f0726597cbfea1ba1801a48b76e6f55 - Host OS:
macOS Sonoma 14.2.1 - Node version:
20.10.0 - Browser:
N/A
Hugo environment
hugo v0.123.3-a75a659f6fc0cb3a52b2b2ba666a81f79a459376+extended darwin/arm64 BuildDate=2024-02-23T17:09:20Z VendorInfo=brew
GOOS="darwin"
GOARCH="arm64"
GOVERSION="go1.22.0"
github.com/sass/libsass="3.6.5"
github.com/webmproject/libwebp="v1.3.2"
github.com/sass/dart-sass/protocol="2.5.0"
github.com/sass/dart-sass/compiler="1.71.1"
github.com/sass/dart-sass/implementation="1.71.1"
Additional context
The exampleSite/_vendor/modules.txt file contains the following content:
# github.com/gethinode/hinode
# github.com/gethinode/mod-bootstrap v1.2.2
# github.com/twbs/bootstrap v5.3.2+incompatible
# github.com/gethinode/mod-flexsearch v1.9.0
# github.com/nextapps-de/flexsearch v0.0.0-20240110101704-4c3966709f85
# github.com/gethinode/mod-fontawesome v1.8.1
# github.com/gethinode/mod-utils/v2 v2.1.1
# github.com/gethinode/mod-katex v1.0.5
# github.com/gethinode/mod-leaflet v1.0.0
# github.com/gethinode/mod-lottie v1.4.3
# github.com/airbnb/lottie-web v5.12.2+incompatible
Adding a version to the first line seems to solve the issue, e.g.:
# github.com/gethinode/hinode v0.0.0
[...]
The problem is likely related to PR #786 and #769. It is unclear if this is a configuration error, or an upstream error with Hugo. @deining, maybe you have some additional thoughts?
It is unclear if this is a configuration error, or an upstream error with Hugo.
This is an upstream error with hugo. I filed an issue for it.
Ok, thanks for investigating this! It appears that manually adding any version info solves the issue. I guess Hugo is unable to determine the correct version because of the local path substitution (as configured in the workspace file).