Description: I’m encountering an issue with loading a Hugo module for my theme. Despite following the recommended steps, I keep getting an error indicating that the module is not found. Here are the details of my setup and the steps I’ve taken:
Steps to Reproduce:
- Project Structure:
- My Hugo site is located at website.
- The theme I’m trying to use is referenced as a Hugo module.
- Configuration (
config.yaml
):
module:
imports:
- path: git.com/path/to/your/theme
theme: “your_theme_name”
- Commands Executed:
hugo mod tidy
hugo mod get -u
Error Message:
Error: failed to load modules: module “your_theme_name” not found in “/Users/pon-16234/web/my_website/website/themes/your_theme_name”; either add it as a Hugo Module or store it in “/Users/pon-16234/web/my_website/website/themes”.: module does not exist
Error: failed to load modules: module “your_theme_name” not found in “/Users/pon/web/my_website/website/themes/your_theme_name”; either add it as a Hugo Module or store it in “/Users/pon/web/my_website/website/themes”.: module does not exist
Additional Information:
- I have verified that the repository URL is correct and accessible.
- I have tried manually cloning the theme into the
themes
directory, but I would prefer to use Hugo Modules for better dependency management.
Request: Could someone please help me identify what might be going wrong and how I can resolve this issue? Any guidance or suggestions would be greatly appreciated.
Thank you!