"you need the extended version to build SCSS/SASS" in extended version?

So I installed the latest available of Hugo Extended provided by MacPorts, but when trying to use a sass configuration I am told “you need the extended version to build SCSS/SASS”,

Running hugo version I get:

hugo v0.82.1+extended darwin/amd64 BuildDate=unknown

In my partial for my template I have:

{{ $sass := resources.Get "sass/main2.scss" }}
{{ $style := $sass | resources.ToCSS }}
<link href="{{ $style }}" rel="stylesheet" type="text/css" />

and then main2.scss is located at assets/sass/main2.scss.

The app output, during hugo server:

ERROR 2021/05/07 01:44:26 Rebuild failed:

ERROR 2021/05/07 01:44:26 Failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:5:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/Users/andym/Development/projects/www/layouts/partials/head.html:109:34": execute of template failed: template: partials/head.html:109:34: executing "partials/head.html" at <resources.ToCSS>: error calling ToCSS: type <nil> not supported in Resource transformations
adding created directory to watchlist /Users/andym/Development/projects/www/assets/sass

Change detected, rebuilding site.
2021-05-07 01:46:07.550 +0200
Total in 784 ms
ERROR 2021/05/07 01:46:08 Rebuild failed:

ERROR 2021/05/07 01:46:08 TOCSS: failed to transform "sass/main2.scss" (text/x-scss). Check your Hugo installation; you need the extended version to build SCSS/SASS.

Any ideas?

Investigated some more: even though hugo version was displaying the expected version, hugo server was not. Running rehash solved the issue.

Note, I did have the the non-extended version previously, so it looks like some paths needed a slight refresh.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.