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

Dart Sass transpiler error in Hugo v0.123.6 #12178

Closed
markdumay opened this issue Feb 29, 2024 · 2 comments · Fixed by #12185
Closed

Dart Sass transpiler error in Hugo v0.123.6 #12178

markdumay opened this issue Feb 29, 2024 · 2 comments · Fixed by #12185

Comments

@markdumay
Copy link

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: #12072

@bep bep added this to the v0.123.7 milestone Feb 29, 2024
@bep bep self-assigned this Feb 29, 2024
@bep bep added v0.123.x and removed NeedsTriage labels Feb 29, 2024
bep added a commit to bep/hugo that referenced this issue Mar 1, 2024
…art Sass and Libsass

This fixes the reverse filesystem lookup (absolute filename to path relative to the composite filesystem).

The old logic had some assumptions about the locality of the actual files that didn't work in more complex scenarios.

This commit now also adds the popular Bootstrap SCSS Hugo module to the CI build (both for libsass and dartsass transpiler), so we can hopefully avoid similar future breakage.

Fixes gohugoio#12178
bep added a commit to bep/hugo that referenced this issue Mar 1, 2024
…art Sass and Libsass

This fixes the reverse filesystem lookup (absolute filename to path relative to the composite filesystem).

The old logic had some assumptions about the locality of the actual files that didn't work in more complex scenarios.

This commit now also adds the popular Bootstrap SCSS Hugo module to the CI build (both for libsass and dartsass transpiler), so we can hopefully avoid similar future breakage.

Fixes gohugoio#12178
bep added a commit to bep/hugo that referenced this issue Mar 1, 2024
…art Sass and Libsass

This fixes the reverse filesystem lookup (absolute filename to path relative to the composite filesystem).

The old logic had some assumptions about the locality of the actual files that didn't work in more complex scenarios.

This commit now also adds the popular Bootstrap SCSS Hugo module to the CI build (both for libsass and dartsass transpiler), so we can hopefully avoid similar future breakage.

Fixes gohugoio#12178
@bep bep closed this as completed in #12185 Mar 1, 2024
bep added a commit that referenced this issue Mar 1, 2024
…art Sass and Libsass

This fixes the reverse filesystem lookup (absolute filename to path relative to the composite filesystem).

The old logic had some assumptions about the locality of the actual files that didn't work in more complex scenarios.

This commit now also adds the popular Bootstrap SCSS Hugo module to the CI build (both for libsass and dartsass transpiler), so we can hopefully avoid similar future breakage.

Fixes #12178
@markdumay
Copy link
Author

Thanks a lot @bep!

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants