Problem with Hugo modules

This helped me with some intermittent problems…

On Linux the default cache directory is /tmp/hugo_cache. This is a volatile location, cleared on reboot. I think the same is true on the Mac.

Set the HUGO_CACHEDIR environment variable to something other than the system temporary directory, but make sure that it is outside of your project path. Related comments:

This may not address the problem that you are experiencing, but it’s good starting point.

2 Likes