gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
75.38k stars 7.49k forks source link

Dart Sass transpiler error in Hugo v0.123.6 #12178

Closed markdumay closed 7 months ago

markdumay commented 7 months ago

What version of Hugo are you using (hugo version)?

hugo v0.123.6-92684f9a26838a46d1a81e3c250fef5207bcb735+extended darwin/arm64 BuildDate=2024-02-28T18:29:40Z VendorInfo=brew

Does this issue reproduce with the latest release?

Yes

Context

When upgrading Hugo from v0.122.0 to v0.123.6 I get a Dart Sass transpiler error. Below the error logs (specific to the mod-bootstrap repo):

ERROR TOCSS-DART: failed to transform "style.app.scss" (text/x-scss): "/Users/mark/Development/GitHub/gethinode/mod-bootstrap/assets/scss/modules/bootstrap/_mixins-dart.scss:9:8": Can't find stylesheet to import.
Total in 211 ms
Error: error building site: TOCSS-DART: failed to transform "style.app.scss" (text/x-scss): "/Users/mark/Development/GitHub/gethinode/mod-bootstrap/assets/scss/modules/bootstrap/_mixins-dart.scss:9:8": Can't find stylesheet to import.

The full environment:

hugo v0.123.6-92684f9a26838a46d1a81e3c250fef5207bcb735+extended darwin/arm64 BuildDate=2024-02-28T18:29:40Z VendorInfo=brew
GOOS="darwin"
GOARCH="arm64"
GOVERSION="go1.22.0"
github.com/sass/libsass="3.6.5"
github.com/webmproject/libwebp="v1.3.2"
github.com/sass/dart-sass/protocol="2.5.0"
github.com/sass/dart-sass/compiler="1.71.1"
github.com/sass/dart-sass/implementation="1.71.1"

The error does not occur when using libsass.

To reproduce

git clone https://github.com/gethinode/mod-bootstrap.git
cd mod-bootstrap/exampleSite
hugo server -e dart

Switching to libsass solves the issue:

hugo server

Notes

A similar issue was already solved, this issue might be another regression: https://github.com/gohugoio/hugo/issues/12072

markdumay commented 7 months ago

Thanks a lot @bep!

github-actions[bot] commented 7 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.