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

Site build failure with Hugo v0.123.8 #189

Closed
TetraTheta opened this issue Mar 8, 2024 · 6 comments
Closed

Site build failure with Hugo v0.123.8 #189

TetraTheta opened this issue Mar 8, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@TetraTheta
Copy link
Contributor

For some reason, I can't preview my site locally. Since it says 'Build failed', I think building site will also fail.

ERROR js.Build failed: "%LocalAppData%\hugo_cache\modules\filecache\modules\pkg\mod\github.com\hbstack\hb@v0.12.1\assets\hb\js\index.tmpl.ts:20:19": Could not resolve "hb/modules//js/button"
ERROR JSBUILD: failed to transform "hb/js/index.ts" (text/typescript): "%LocalAppData%\hugo_cache\modules\filecache\modules\pkg\mod\github.com\hbstack\hb@v0.12.1\assets\hb\js\index.tmpl.ts:3:9": Could not resolve "index.ts"
ERROR render of "page" failed: "%LocalAppData%\hugo_cache\modules\filecache\modules\pkg\mod\github.com\hbstack\hb@v0.12.1\layouts\_default\baseof.html:20:8": execute of template failed: template: _default/single.html:20:8: executing "_default/single.html" at <partial "hugopress/body-end" .>: error calling partial: "%LocalAppData%\hugo_cache\modules\filecache\modules\pkg\mod\github.com\hugomods\hugopress@v0.2.3\layouts\partials\hugopress\body-end.html:1:4": execute of template failed: template: partials/hugopress/body-end.html:1:4: executing "partials/hugopress/body-end.html" at <partial "hugopress/functions/render-hooks" (dict "Name" "body-end" "Page" .)>: error calling partial: "%LocalAppData%\hugo_cache\modules\filecache\modules\pkg\mod\github.com\hugomods\hugopress@v0.2.3\layouts\partials\hugopress\functions\render-hooks.html:18:8": execute of template failed: template: partials/hugopress/functions/render-hooks.html:18:8: executing "partials/hugopress/functions/render-hooks.html" at <partialCached .partial $ctx>: error calling partialCached: "%LocalAppData%\hugo_cache\modules\filecache\modules\pkg\mod\github.com\hbstack\hb@v0.12.1\layouts\partials\hugopress\modules\hb\hooks\body-end.html:1:4": execute of template failed: template: partials/hugopress/modules/hb/hooks/body-end.html:1:4: executing "partials/hugopress/modules/hb/hooks/body-end.html" at <partialCached "hb/assets/js" .Page>: error calling partialCached: "%LocalAppData%\hugo_cache\modules\filecache\modules\pkg\mod\github.com\hbstack\hb@v0.12.1\layouts\partials\hb\assets\js.html:28:25": execute of template failed: template: partials/hb/assets/js.html:28:25: executing "partials/hb/assets/js.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/javascript" and "text/typescript"
Built in 16292 ms
Error: error building site: TOCSS: failed to transform "hb/scss/index.scss" (text/x-scss): "%LocalAppData%\hugo_cache\modules\filecache\modules\pkg\mod\github.com\hbstack\hb@v0.12.1\assets\hb\scss\index.tmpl.scss:117:1": File to import not found or unreadable: index.scss.

I updated every dependencies with these:

  • Hugo version: v0.123.8
  • Hugo module updated via hugo mod get -u ./...
  • Node packages were updated with npx --yes npm-check-updates

I'm posting this issue in here because I can see a lot of hbstack\hb in error message.

Maybe I updated Hugo too early... 🤷 ¯_(ツ)_/¯

@razonyang
Copy link
Member

razonyang commented Mar 8, 2024

Confirmed, I'd suggest downgrading Hugo version to 0.123.7 or earlier until it was fixed.

@razonyang razonyang added the bug Something isn't working label Mar 8, 2024
@razonyang
Copy link
Member

razonyang commented Mar 8, 2024

Related to gohugoio/hugo#12214.

@razonyang razonyang changed the title Site build failure Site build failure with Hugo v0.123.8 Mar 9, 2024
@razonyang
Copy link
Member

Fixed since Hugo v0.124.0.

@FuadEfendi
Copy link

Ok; I submitted duplicate "ticket" today but then I found this post... I have this issue with hugo v0.126.1+extended darwin/arm64

@fr24pk
Copy link

fr24pk commented Sep 13, 2024

The same error was reported in issue-2508534712 in the example of bootstrap-bp-hugo-theme.

@razonyang
Copy link
Member

razonyang commented Sep 13, 2024

@fr24pk Hi, that theme is not built on top of this framework, there is nothing we can help.

Check your Hugo installation; you need the extended version to build SCSS/SASS with transpiler set to 'libsass'.: this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information.

BUT, as the error logs described from that issue, you need to install the extended Hugo version instead.

Enter hugo version to check if your Hugo version is extended.

hugo version

If the output contains extended then it is extended version.

If you want to use HB themes, you'll need to either install Dart Sass or keep using libsass. An extended Hugo version is required as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants