Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors occur when trying to run the website locally #25

Closed
jihoon-seo opened this issue Nov 11, 2022 · 9 comments
Closed

Errors occur when trying to run the website locally #25

jihoon-seo opened this issue Nov 11, 2022 · 9 comments
Assignees

Comments

@jihoon-seo
Copy link
Contributor

jihoon-seo commented Nov 11, 2022

I tried to run the website locally, but some errors occurred.

[env]

[prereq]

  • make init-theme
  • make update-theme

[cmd & output]

❯ hugo server -v                                     
Start building sites … 
hugo v0.91.2+extended linux/amd64 BuildDate=unknown
INFO 2022/11/11 16:15:24 syncing static files to /
ERROR 2022/11/11 16:15:24 render of "page" failed: execute of template failed: template: docs/single.html:30:7: executing "docs/single.html" at <partial "scripts.html" .>: error calling partial: "/home/jhseo/prow/site/themes/docsy/layouts/partials/scripts.html:67:107": execute of template failed: template: partials/scripts.html:67:107: executing "partials/scripts.html" at <resources.Concat>: error calling Concat: slice []interface {} not supported in concat
ERROR 2022/11/11 16:15:24 render of "page" failed: execute of template failed: template: docs/single.html:30:7: executing "docs/single.html" at <partial "scripts.html" .>: error calling partial: "/home/jhseo/prow/site/themes/docsy/layouts/partials/scripts.html:67:107": execute of template failed: template: partials/scripts.html:67:107: executing "partials/scripts.html" at <resources.Concat>: error calling Concat: slice []interface {} not supported in concat
ERROR 2022/11/11 16:15:24 render of "page" failed: execute of template failed: template: docs/single.html:30:7: executing "docs/single.html" at <partial "scripts.html" .>: error calling partial: "/home/jhseo/prow/site/themes/docsy/layouts/partials/scripts.html:67:107": execute of template failed: template: partials/scripts.html:67:107: executing "partials/scripts.html" at <resources.Concat>: error calling Concat: slice []interface {} not supported in concat
ERROR 2022/11/11 16:15:24 render of "page" failed: execute of template failed: template: docs/single.html:30:7: executing "docs/single.html" at <partial "scripts.html" .>: error calling partial: "/home/jhseo/prow/site/themes/docsy/layouts/partials/scripts.html:67:107": execute of template failed: template: partials/scripts.html:67:107: executing "partials/scripts.html" at <resources.Concat>: error calling Concat: slice []interface {} not supported in concat
ERROR 2022/11/11 16:15:24 failed to render pages: render of "page" failed: execute of template failed: template: docs/single.html:30:7: executing "docs/single.html" at <partial "scripts.html" .>: error calling partial: "/home/jhseo/prow/site/themes/docsy/layouts/partials/scripts.html:67:107": execute of template failed: template: partials/scripts.html:67:107: executing "partials/scripts.html" at <resources.Concat>: error calling Concat: slice []interface {} not supported in concat
Error: Error building site: TOCSS: failed to transform "scss/main.scss" (text/x-scss): SCSS processing failed: file "stdin", line 6, col 1: File to import not found or unreadable: ../vendor/bootstrap/scss/bootstrap. 
Built in 169 ms
@jihoon-seo
Copy link
Contributor Author

jihoon-seo commented Nov 11, 2022

Downgrading Docsy to v0.3.0 (or v0.2.0) resolved this issue.

[How to downgrade Docsy to v0.3.0]

  • cd site/themes/docsy
  • git pull
  • git checkout tags/v0.3.0
  • git submodule update --init --recursive --depth 1
  • cd ../.. (I mean, prow/site/)

  • It seems that it would be great to specify the Docsy version in the .gitmodules file.
  • In future, we might bump Docsy to newer than v0.3.0.

@jihoon-seo
Copy link
Contributor Author

First of all, I cannot figure out & want to know which Docsy version is used in the Netlify production/preview builds.


Although I wrote this comment, it seems that downgrading Docsy to v0.3.0 is not a sustainable & desirable solution.

One noticeable point is that Docsy (v0.3.0 → v0.4.0) changed the way to import Bootstrap and FontAwesome - from 'git submodules' to NPM packages, and this might break Netlify production/preview builds and/or local preview builds if Docsy ~v0.3.0 is used in Netlify builds for now and we are to bump the Docsy version.

Currently Docsy is suggesting to convert an existing site to use Docsy as a Hugo Module,
and adopting this conversion to this repo might resolve this issue somehow magically.

@listx
Copy link
Contributor

listx commented Dec 15, 2022

I can try converting us to use Docsy as a Hugo Module to try to see if that helps things. As a user though I think I'm more interested in solving the broken icons issue you filed in #27. Maybe using a Hugo Module will fix both issues at once?

@jihoon-seo
Copy link
Contributor Author

@listx Honestly I am not sure whether:

IMO it would be great for us to

  • apply the suggestion and see whether we can run website locally from clean env without error, and
  • apply the suggestion to prod (because FontAwesome icons are not displayed #27 is not reproducible on previews and local) and see whether
    • Netlify build for prod site succeeds without error, and
    • icons are displayed well.

One more thing is that we might update some deps as well when applying the fix, like:

@listx
Copy link
Contributor

listx commented Dec 16, 2022

apply the suggestion

By this do you mean using Docsy as a Hugo Module or something else?

@jihoon-seo
Copy link
Contributor Author

Yes I meant 'using Docsy as a Hugo Module'. 😊

@listx
Copy link
Contributor

listx commented Dec 16, 2022

/assign @listx

@listx
Copy link
Contributor

listx commented Dec 19, 2022

See #35.

@jihoon-seo
Copy link
Contributor Author

This issue seems to be resolved by the PR #35.


I checked and confirm that

on

User can run website locally by just running make which executes the default Makefile rule (serve),
without preparing prereqs by like:

  • make init-theme
  • make update-theme
  • git submodule update
  • npm install

So I am going to close this issue.
Please feel free to comment or reopen if anyone needs to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants