hugo
hugo copied to clipboard
Module replacements not able to resolve nested modules
What version of Hugo are you using (hugo version
)?
$ hugo version hugo v0.92.2+extended linux/amd64 BuildDate=unknown
Does this issue reproduce with the latest release?
Yes
The issue
I have the following in my config.yaml
.
module:
replacements:
- github.com/UtkarshVerma/hugo-yoru -> ../../hugo-yoru
imports:
- path: github.com/UtkarshVerma/hugo-yoru
Now, the hugo-yoru
module depends on FontAwesome. When I run Hugo server, I get the following error:
Error: module "github.com/FortAwesome/Font-Awesome" not found; either add it as a Hugo Module or store it in "/home/subaru/GitHub/bitbanged.com/themes".: module does not exist
Thanks in advance.
This is a limitation of replacements
, I'm afraid, and not something I think that's easily solvable. The replacements just replaces the path
value, nothing else.
I would suggest that you use the replace directive in go.mod
. Note that all of this will (hopefully) be much improved in a month or so with Go 1.18's workspaces.