Strange module issue

I’m having an issue with modules. This just started happening recently, I suspect it may be due to the size of the repo.

When I run Hugo mod get , Hugo starts downloading modules and eventually starts printing out hugo: downloading modules … over and over.

I identified the module cause the issue and ran go get instead and the module downloads successfully.

Then if I go back and run hugo mod get again I get the same hugo: downloading modules … message again.

This happens if the problem module is the only one in the hugo config as well. All other modules work fine.

To be clear: the command hugo mod get is to be used to update modules (which I guess differs from how go get works, which I guess may have been a mistake, but it’s as documented).

If you just want to download the modules, use hugo or if you only want to test the setup hugo config.

Are you saying that this never completes (within reasonably time)?

I say this, because hugo mod get does (potentially) more work compared to go get for a given module (the go variant is lazy, it waits for packages to be used in Go code, we cannot do that).


  1. What go version are you using?
  2. How big is this repo?
  3. Is this repo public (could I test it?)?

I finally got it to work, I’m not sure what I did exactly. I basically rebuilt the hugo config line by line, making sure each module downloaded and every time I got this issue I manually removed the cache, did a hugo mod tidy and then did a hugo mod get -u on the problem module. This finally worked. The resulting config file is identical to the original one, in fact I still have a site in production using it. I can only assume it was a problem locally.

  1. I’m on Go 1.20
  2. It’s a blog with about 2 years of weekly posts and images, not the largest one I have.
  3. It’s not public, I usually try to publish a piece of it so I can show what’s happening, but in this case I was just lost.

I appreciate your time, if it happens again I’ll try to get permission to post the repo publically. Thx.

1 Like