Bug 255804 - Website build failed on linux
Summary: Website build failed on linux
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Website (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-doc (Nobody)
URL:
Keywords:
Depends on:
Blocks: 255696
  Show dependency treegraph
 
Reported: 2021-05-11 23:16 UTC by Guangyuan Yang
Modified: 2022-02-28 20:15 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guangyuan Yang freebsd_committer freebsd_triage 2021-05-11 23:16:13 UTC
Not a high priority, but since we are using hugo/asciidoc which should be platform-independent, the build should work on other UNIX-like systems with relevant dependencies satisfied. However, I tried a website build on Ubuntu and got the following:

vagrant@ubuntu-hirsute:~/freebsd-doc/website$ BIND=0.0.0.0 bmake run-local
/usr/bin/env hugo server -D --bind=0.0.0.0 --baseURL="http://localhost:1313"
Start building sites …
ERROR 2021/05/11 23:01:50 render of "page" failed: execute of template failed: template: _default/single.html:5:9: executing "main" at <partial "sidenav.html" (dict "sidenavType" .Params.sidenav "data" .Site.Data "language" $.Site.Language.Lang)>: error calling partial: "/home/vagrant/freebsd-doc/website/themes/beastie/layouts/partials/sidenav.html:64:59": execute of template failed: template: partials/sidenav.html:64:59: executing "partials/sidenav.html" at <index .data.releases "u-rel130-announce">: error calling index: index of untyped nil
ERROR 2021/05/11 23:01:50 render of "page" failed: execute of template failed: template: _default/single.html:5:9: executing "main" at <partial "sidenav.html" (dict "sidenavType" .Params.sidenav "data" .Site.Data "language" $.Site.Language.Lang)>: error calling partial: "/home/vagrant/freebsd-doc/website/themes/beastie/layouts/partials/sidenav.html:64:59": execute of template failed: template: partials/sidenav.html:64:59: executing "partials/sidenav.html" at <index .data.releases "u-rel130-announce">: error calling index: index of untyped nil
ERROR 2021/05/11 23:01:50 render of "page" failed: execute of template failed: template: _default/single.html:5:9: executing "main" at <partial "sidenav.html" (dict "sidenavType" .Params.sidenav "data" .Site.Data "language" $.Site.Language.Lang)>: error calling partial: "/home/vagrant/freebsd-doc/website/themes/beastie/layouts/partials/sidenav.html:64:59": execute of template failed: template: partials/sidenav.html:64:59: executing "partials/sidenav.html" at <index .data.releases "u-rel130-announce">: error calling index: index of untyped nil
ERROR 2021/05/11 23:01:50 render of "page" failed: execute of template failed: template: _default/single.html:5:9: executing "main" at <partial "sidenav.html" (dict "sidenavType" .Params.sidenav "data" .Site.Data "language" $.Site.Language.Lang)>: error calling partial: "/home/vagrant/freebsd-doc/website/themes/beastie/layouts/partials/sidenav.html:64:59": execute of template failed: template: partials/sidenav.html:64:59: executing "partials/sidenav.html" at <index .data.releases "u-rel130-announce">: error calling index: index of untyped nil
ERROR 2021/05/11 23:01:50 render of "page" failed: execute of template failed: template: _default/single.html:5:9: executing "main" at <partial "sidenav.html" (dict "sidenavType" .Params.sidenav "data" .Site.Data "language" $.Site.Language.Lang)>: error calling partial: "/home/vagrant/freebsd-doc/website/themes/beastie/layouts/partials/sidenav.html:64:59": execute of template failed: template: partials/sidenav.html:64:59: executing "partials/sidenav.html" at <index .data.releases "u-rel130-announce">: error calling index: index of untyped nil
Built in 10506 ms
Error: Error building site: failed to render pages: render of "home" failed: "/home/vagrant/freebsd-doc/website/themes/beastie/layouts/index.html:51:27": execute of template failed: template: index.html:51:27: executing "main" at <index $.Site.Data.releases "u-rel130-announce">: error calling index: index of untyped nil
*** Error code 255

Stop.
bmake: stopped in /home/vagrant/freebsd-doc/website

System info:

vagrant@ubuntu-hirsute:~/freebsd-doc/website$ hugo version
hugo v0.82.0+extended linux/amd64 BuildDate=unknown
vagrant@ubuntu-hirsute:~/freebsd-doc/website$ asciidoctor --version
Asciidoctor 2.0.12 [https://asciidoctor.org]
Runtime Environment (ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux-gnu]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)
vagrant@ubuntu-hirsute:~/freebsd-doc/website$ uname -a
Linux ubuntu-hirsute 5.11.0-17-generic #18-Ubuntu SMP Thu May 6 20:10:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Comment 1 Minsoo Choo 2021-09-11 01:45:43 UTC
First, I found that this is not the hugo's problem because there are many examples of index of untyped nil. We have to edit those file that fit in any operating systems, but I don't know about hugo script.
Comment 2 Minsoo Choo 2021-09-12 12:50:09 UTC
This happens to me on FreeBSD. I installe docproj but this problem keeps happen.

Tested on FreeBSD 13 Release on amd64, both on normal user and root.
Comment 3 Minsoo Choo 2021-09-12 14:00:47 UTC
I found that the problem can happen when the user does not build witih "bmake" before "bmake run-local"
Comment 4 Sergio Carlavilla Delgado freebsd_committer freebsd_triage 2022-02-28 20:15:28 UTC
Fixed! Right now the documentation and the website can be used with GNU/Linux