Skip to content

Module configuration prevent initializing modules (hugo mod init) #11458

@razonyang

Description

@razonyang
$ cat config/_default/hugo.yaml
module:
  imports:
    - path: github.com/hbstack/theme-start

$ hugo mod init example.com/user/repo
Error: failed to load modules: module "github.com/hbstack/theme-start" not found in "/tmp/start-page/themes/github.com/hbstack/theme-start"; either add it as a Hugo Module or store it in "/tmp/start-page/themes".: module does not exist

Hi, I encountered an strange issue that couldn't hugo mod init with existing module configurations, have to remove/comment those imports first.

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.118.2-da7983ac4b94d97d776d7c2405040de97e95c03d+extended linux/amd64 BuildDate=2023-08-31T11:23:51Z VendorInfo=gohugoio

Does this issue reproduce with the latest release?

Yes

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions