# Hugo server error related to hugo modules and local cache

**URL:** <https://discourse.gohugo.io/t/hugo-server-error-related-to-hugo-modules-and-local-cache/45197>\
**Category:** support\
**Tags:** modules\
**Created:** [July 8, 2023, 11:54am UTC](https://discourse.gohugo.io/t/hugo-server-error-related-to-hugo-modules-and-local-cache/45197 "2023-07-08T11:54:40Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![fhsheridan](https://avatars.discourse-cdn.com/v4/letter/f/b9bd4f/32.png) [@fhsheridan](https://discourse.gohugo.io/u/fhsheridan)\
**Post date:** [July 8, 2023, 1:39pm UTC](https://discourse.gohugo.io/t/hugo-server-error-related-to-hugo-modules-and-local-cache/45197/3 "2023-07-08T13:39:25Z")

</div>

hello and thank you so much for the help.

I think you are exactly correct and I am trying to sort out the HUGO\_CACHEDIR command

I was reading the below article but I don’t understand it. Can you point me in the direction of a resource with more info on this command, it’s flags, and where I should place the cache location on a mac? If not, no problem, I will see if I can start to understand the below post.

> [@How do I set module cache directory to \`~/.local/share/hugo\` globally?](https://discourse.gohugo.io/t/how-do-i-set-module-cache-directory-to-local-share-hugo-globally/37118):
>
> Downloading Hugo modules over and over again (after reboots) is something I want to avoid. I can see that there is a config variable for changing the Hugo module cache, but I don’t know how to set this globally.

placing the cache in the usr/local/share directory makes sense to me. But, when I run HUGO\_CACHEDIR at the command line i get an error saying command not found. thanks

---

_[View the full topic](https://discourse.gohugo.io/t/hugo-server-error-related-to-hugo-modules-and-local-cache/45197)._
