hbstack / hb

The core module of HB framework, which automatically load and compile module's TypeScript and SCSS.
https://hbstack.dev/
MIT License
18 stars 3 forks source link

Site build failure with Hugo v0.123.8 #189

Closed TetraTheta closed 8 months ago

TetraTheta commented 9 months ago

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:

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 commented 9 months ago

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

razonyang commented 9 months ago

Related to gohugoio/hugo#12214.

razonyang commented 8 months ago

Fixed since Hugo v0.124.0.

FuadEfendi commented 5 months ago

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 commented 2 months ago

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

razonyang commented 2 months ago

@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.