# Compilation Error

**URL:** <https://discourse.gohugo.io/t/compilation-error/43988>\
**Category:** support\
**Created:** [April 19, 2023, 3:25pm UTC](https://discourse.gohugo.io/t/compilation-error/43988 "2023-04-19T15:25:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![leturc](https://avatars.discourse-cdn.com/v4/letter/l/a88e4f/32.png) [@leturc](https://discourse.gohugo.io/u/leturc)\
**Post date:** [April 19, 2023, 3:25pm UTC](https://discourse.gohugo.io/t/compilation-error/43988/1 "2023-04-19T15:25:18Z")

</div>

Dear All,

I’m new on HUGO and has no experience on. I have to change the hosting for a reason of our website which is actually on AWS. the former it send to me the source of the website and told me he is on v0.8. When I launch the site to compile the public folder I’m getting following errors:

ERROR 2023/04/19 17:03:55 render of “page” failed: “C:\Hugo\bin\front\_2019\themes\asinternational\layouts\_default\baseof.html:6:31”: execute of template failed: template: \_default/single.html:6:31: executing “site/meta” at \<partial “site/meta.html” .\>: error calling partial: “C:\Hugo\bin\front\_2019\themes\asinternational\layouts\partials\site\meta.html:6:8”: execute of template failed: template: partials/site/meta.html:6:8: executing “partials/site/meta.html” at \<.Hugo.Generator\>: can’t evaluate field Hugo in type \*hugolib.pageState

I have looked over the different forums but didn’t managed to solve it.

I have released in baseof.html .URL by .RelPermalink but still get following error:

Start building sites …  
hugo v0.111.3-5d4eb5154e1fed125ca8e9b5a0315c4180dab192+extended windows/amd64 BuildDate=2023-03-12T11:40:50Z VendorInfo=gohugoio  
ERROR 2023/04/19 17:23:11 render of “page” failed: “C:\Hugo\bin\front\_2019\themes\asinternational\layouts\_default\baseof.html:6:31”: execute of template failed: template: \_default/single.html:6:31: executing “site/meta” at \<partial “site/meta.html” .\>: error calling partial: “C:\Hugo\bin\front\_2019\themes\asinternational\layouts\partials\site\meta.html:6:8”: execute of template failed: template: partials/site/meta.html:6:8: executing “partials/site/meta.html” at \<.Hugo.Generator\>: can’t evaluate field Hugo in type \*hugolib.pageState  
ERROR 2023/04/19 17:23:11 render of “page” failed: “C:\Hugo\bin\front\_2019\themes\asinternational\layouts\_default\baseof.html:6:31”: execute of template failed: template: \_default/single.html:6:31: executing “site/meta” at \<partial “site/meta.html” .\>: error calling partial: “C:\Hugo\bin\front\_2019\themes\asinternational\layouts\partials\site\meta.html:6:8”: execute of template failed: template: partials/site/meta.html:6:8: executing “partials/site/meta.html” at \<.Hugo.Generator\>: can’t evaluate field Hugo in type \*hugolib.pageState  
ERROR 2023/04/19 17:23:11 render of “page” failed: “C:\Hugo\bin\front\_2019\themes\asinternational\layouts\_default\baseof.html:6:31”: execute of template failed: template: \_default/single.html:6:31: executing “site/meta” at \<partial “site/meta.html” .\>: error calling partial: “C:\Hugo\bin\front\_2019\themes\asinternational\layouts\partials\site\meta.html:6:8”: execute of template failed: template: partials/site/meta.html:6:8: executing “partials/site/meta.html” at \<.Hugo.Generator\>: can’t evaluate field Hugo in type \*hugolib.pageState  
ERROR 2023/04/19 17:23:11 render of “page” failed: “C:\Hugo\bin\front\_2019\themes\asinternational\layouts\_default\baseof.html:6:31”: execute of template failed: template: \_default/single.html:6:31: executing “site/meta” at \<partial “site/meta.html” .\>: error calling partial: “C:\Hugo\bin\front\_2019\themes\asinternational\layouts\partials\site\meta.html:6:8”: execute of template failed: template: partials/site/meta.html:6:8: executing “partials/site/meta.html” at \<.Hugo.Generator\>: can’t evaluate field Hugo in type \*hugolib.pageState  
Error: Error building site: failed to render pages: render of “page” failed: “C:\Hugo\bin\front\_2019\themes\asinternational\layouts\_default\baseof.html:6:31”: execute of template failed: template: \_default/single.html:6:31: executing “site/meta” at \<partial “site/meta.html” .\>: error calling partial: “C:\Hugo\bin\front\_2019\themes\asinternational\layouts\partials\site\meta.html:6:8”: execute of template failed: template: partials/site/meta.html:6:8: executing “partials/site/meta.html” at \<.Hugo.Generator\>: can’t evaluate field Hugo in type \*hugolib.pageState  
Built in 1026 ms

Do you have any idea about the solution?

---

<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:** [April 19, 2023, 3:35pm UTC](https://discourse.gohugo.io/t/compilation-error/43988/2 "2023-04-19T15:35:19Z")

</div>

The `.Hugo` method was deprecated, replaced by the global `hugo` function.

[https://gohugo.io/functions/hugo](https://gohugo.io/functions/hugo)

By default\[1\], Hugo injects this in your home page:

```auto
<meta name=generator content="Hugo n.n.n">

```

So unless you want to inject the version on every page, you can remove the meta element from your template.

* * *

1. Assuming that [`disableHugoGeneratorInject`](https://gohugo.io/getting-started/configuration/#disablehugogeneratorinject) is `false` or not present in your site configuration.

---

<div class="post-metadata">

**Author:** ![leturc](https://avatars.discourse-cdn.com/v4/letter/l/a88e4f/32.png) [@leturc](https://discourse.gohugo.io/u/leturc)\
**Post date:** [April 19, 2023, 9:28pm UTC](https://discourse.gohugo.io/t/compilation-error/43988/3 "2023-04-19T21:28:13Z")

</div>

Dear jmooring,

thank you for your help. I haven’t found such strings in html’s. But, I have replaced .Hugo.Generator by hugo.Generator and now I have an issue with:

hugo v0.111.3-5d4eb5154e1fed125ca8e9b5a0315c4180dab192+extended windows/amd64 BuildDate=2023-03-12T11:40:50Z VendorInfo=gohugoio  
ERROR 2023/04/19 23:24:41 render of “page” failed: “C:\Hugo\bin\front\_2019\themes\asinternational\layouts\_default\baseof.html:52:62”: execute of template failed: template: blog/single.html:52:62: executing “blog/single.html” at \<.Dir\>: can’t evaluate field Dir in type \*hugolib.pageState  
ERROR 2023/04/19 23:24:41 render of “page” failed: “C:\Hugo\bin\front\_2019\themes\asinternational\layouts\_default\baseof.html:52:62”: execute of template failed: template: \_default/single.html:52:62: executing “\_default/single.html” at \<.Dir\>: can’t evaluate field Dir in type \*hugolib.pageState  
ERROR 2023/04/19 23:24:41 render of “page” failed: “C:\Hugo\bin\front\_2019\themes\asinternational\layouts\_default\baseof.html:52:62”: execute of template failed: template: \_default/single.html:52:62: executing “\_default/single.html” at \<.Dir\>: can’t evaluate field Dir in type \*hugolib.pageState  
ERROR 2023/04/19 23:24:41 render of “page” failed: “C:\Hugo\bin\front\_2019\themes\asinternational\layouts\_default\baseof.html:52:62”: execute of template failed: template: \_default/single.html:52:62: executing “\_default/single.html” at \<.Dir\>: can’t evaluate field Dir in type \*hugolib.pageState  
Error: Error building site: failed to render pages: render of “page” failed: “C:\Hugo\bin\front\_2019\themes\asinternational\layouts\_default\baseof.html:52:62”: execute of template failed: template: contact/single.html:52:62: executing “contact/single.html” at \<.Dir\>: can’t evaluate field Dir in type \*hugolib.pageState  
Total in 2224 ms

Do you have any idea?

---

<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:** [April 19, 2023, 11:30pm UTC](https://discourse.gohugo.io/t/compilation-error/43988/4 "2023-04-19T23:30:06Z")

</div>

Please share your repository. Otherwise I fear that we’ll be going back and forth forever. Your site was last built with a very old version, and many things have changed.

---

<div class="post-metadata">

**Author:** ![leturc](https://avatars.discourse-cdn.com/v4/letter/l/a88e4f/32.png) [@leturc](https://discourse.gohugo.io/u/leturc)\
**Post date:** [April 20, 2023, 11:55am UTC](https://discourse.gohugo.io/t/compilation-error/43988/5 "2023-04-20T11:55:12Z")

</div>

Dear jmooring,

would you please detail how to share the repository?

---

<div class="post-metadata">

**Author:** ![Arif](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/arif/32/20931_2.png) [@Arif](https://discourse.gohugo.io/u/Arif)\
**Post date:** [April 20, 2023, 12:41pm UTC](https://discourse.gohugo.io/t/compilation-error/43988/6 "2023-04-20T12:41:49Z")

</div>

> [@Requesting Help](https://discourse.gohugo.io/t/requesting-help/9132#let-us-see-your-code-8):
>
> Please read and follow the below guidelines before asking for help in the forum. [DOCS](https://gohugo.io/documentation/) | [THEMES](https://themes.gohugo.io/) | [NEWS](https://gohugo.io/news/) | [GITHUB](https://github.com/gohugoio/hugo) | [FAQ](https://gohugo.io/troubleshooting/faq/) | [RELEASE NOTES](https://github.com/gohugoio/hugo/releases)How to Request Help Welcome to the Hugo forums and thanks for using Hugo! The below are a few friendly tips on getting help from the other Hugo volunteers in this forum. Some Knowledge Required Dare we say that while Hugo is indeed pretty magical, it is not meant to be a “magic wand” to suddenly give you a published website a la Square Space or Wordpress. You …

---

<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:** [April 20, 2023, 2:22pm UTC](https://discourse.gohugo.io/t/compilation-error/43988/7 "2023-04-20T14:22:46Z")

</div>

Upgrading your very old site to be compatible with the current version of Hugo is going to take some time and expertise. As Hugo is quite new to you, perhaps it would be better if you installed the earlier version.

[https://github.com/gohugoio/hugo/releases/tag/v0.8](https://github.com/gohugoio/hugo/releases/tag/v0.8)
