# Problem with Hugo modules

**URL:** https://discourse.gohugo.io/t/problem-with-hugo-modules/37837
**Category:** support
**Tags:** modules
**Created:** [March 24, 2022, 3:56pm UTC](https://discourse.gohugo.io/t/problem-with-hugo-modules/37837 "2022-03-24T15:56:59Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)
#### Post date: [March 24, 2022, 4:45pm UTC](https://discourse.gohugo.io/t/problem-with-hugo-modules/37837/6 "2022-03-24T16:45:06Z")

</div>

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:

- [https://discourse.gohugo.io/t/hugo-modules-for-dummies/20758/8](https://discourse.gohugo.io/t/hugo-modules-for-dummies/20758/8)
- [https://discourse.gohugo.io/t/module-cache/34091/2](https://discourse.gohugo.io/t/module-cache/34091/2)

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

---

_[View the full topic](https://discourse.gohugo.io/t/problem-with-hugo-modules/37837)._
