# Error when trying to create public

**URL:** <https://discourse.gohugo.io/t/error-when-trying-to-create-public/30563>\
**Category:** support\
**Created:** [January 11, 2021, 9:44am UTC](https://discourse.gohugo.io/t/error-when-trying-to-create-public/30563 "2021-01-11T09:44:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Houman](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/houman/32/13152_2.png) [@Houman](https://discourse.gohugo.io/u/Houman)\
**Post date:** [January 11, 2021, 9:44am UTC](https://discourse.gohugo.io/t/error-when-trying-to-create-public/30563/1 "2021-01-11T09:44:48Z")

</div>

Hello,

When I’m trying to create the public files, I get this error on fresh vex-hugo installation.

```auto
➜ exampleSite (master) ✗ hugo
Total in 11 ms
Error: module "vex-hugo" not found; either add it as a Hugo Module or store it in "/Users/houmie/projects/vex-hugo/exampleSite/themes".: module does not exist

```

What am I missing please?  
Thanks

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [January 11, 2021, 10:56am UTC](https://discourse.gohugo.io/t/error-when-trying-to-create-public/30563/2 "2021-01-11T10:56:54Z")

</div>

> [@Houman](#):
>
> What am I missing please?

The theme is not found. The console gives detailed instructions:

> add it as a Hugo Module or store it in “/Users/houmie/projects/vex-hugo/exampleSite/themes”

Also see the Doc on [Hugo Modules | Hugo](https://gohugo.io/hugo-modules/)

---

<div class="post-metadata">

**Author:** ![Houman](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/houman/32/13152_2.png) [@Houman](https://discourse.gohugo.io/u/Houman)\
**Post date:** [January 11, 2021, 11:19am UTC](https://discourse.gohugo.io/t/error-when-trying-to-create-public/30563/3 "2021-01-11T11:19:15Z")

</div>

Fair point. When I’m running it like this:

```auto
hugo server --themesDir ../..

```

it works. So I need somehow to pass this along to Hugo when generating the public files.

I read the bit that you linked and find this confusing. Why should I pass on the path to a Github project, if the module is already locally available?

```auto
[module]
  [[module.imports]]
    path = "github.com/spf13/hyde"

```

I experimented like this:

```auto
[module]
  [[module.imports]]
    path = "/Users/houmie/projects/vex-hugo/exampleSite"

```

But it still doesn’t work.

So I ended up doing this:

```auto
hugo --themesDir ../..

```

and now it works. 🙂

P.S. if there is a way I could set this up better in the config, I’m happy to learn that approach. Thanks

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [January 11, 2021, 11:26am UTC](https://discourse.gohugo.io/t/error-when-trying-to-create-public/30563/4 "2021-01-11T11:26:52Z")

</div>

> [@Houman](#):
>
> if there is a way I could set this up better in the config

`themesDir = "../.."` is the relevant parameter that can be used in the `exampleSite` config.  
See [here](https://github.com/theNewDynamic/gohugo-theme-ananke/blob/master/exampleSite/config.toml#L5) for an example.

---

<div class="post-metadata">

**Author:** ![Houman](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/houman/32/13152_2.png) [@Houman](https://discourse.gohugo.io/u/Houman)\
**Post date:** [January 11, 2021, 11:30am UTC](https://discourse.gohugo.io/t/error-when-trying-to-create-public/30563/5 "2021-01-11T11:30:26Z")

</div>

Yes, this is it. Now it’s super simple, I can just run `hugo` or `hugo server`.

I’m surprised vex-hugo makers don’t add `themesDir = "../.."` by default to config.toml.

Thanks

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [January 11, 2021, 11:42am UTC](https://discourse.gohugo.io/t/error-when-trying-to-create-public/30563/6 "2021-01-11T11:42:46Z")

</div>

> [@Houman](#):
>
> I’m surprised vex-hugo makers don’t add `themesDir = "../.."` by default to config.toml.

Well technically this is not correct.

The recommended way would be for you to organize your Hugo project in its own folder and place the theme undes `/themes/vex-hugo/` or mount it as a module.

You are not really supposed to deploy from within an `exampleSite` folder (it can be done as you found out, but better stick with the recommended workflows as described in the Hugo Docs, especially since it seems that you only recently started out using Hugo).

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [January 13, 2021, 11:42am UTC](https://discourse.gohugo.io/t/error-when-trying-to-create-public/30563/7 "2021-01-13T11:42:58Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
