I have installed Hugo extended version in my ubuntu using Homebrew
$ hugo version
hugo v0.88.1-5BC54738+extended linux/amd64 BuildDate=2021-09-04T09:39:19Z VendorInfo=gohugoio
I tried using latest CSS features,
width: min(991px, 80%);
But I got this error.
ERROR 2022/03/17 19:40:04 Rebuild failed:
ERROR 2022/03/17 19:40:04 TOCSS: failed to transform “scss/main.scss” (text/x-scss): SCSS processing failed: file “”, line 0, col 0: Incompatible units: ‘%’ and ‘px’.
Total in 4 ms
I’m not sure if I had to update any path. And how to do it?
Yes, Dart sass is not working. I tried using @use, it throws error.
hugo v0.88.1-5BC54738+extended linux/amd64 BuildDate=2021-09-04T09:39:19Z VendorInfo=gohugoio
Error: Error building site: TOCSS: failed to transform “scss/main.scss” (text/x-scss): SCSS processing failed: file “stdin”, line 50, col 19: Invalid CSS after " font-size: fonts": expected expression (e.g. 1px, bold), was “.$font_size-body;”
Built in 21 ms
I also removed hugo completed and reinstalled using binary,
and then I got when I ran “hugo server”
$ hugo server
Start building sites …
hugo v0.96.0-2fd4a7d3d6845e75f8b8ae3a2a7bd91438967bbb+extended linux/amd64 BuildDate=2022-03-26T09:15:58Z VendorInfo=gohugoio
Error: Error building site: TOCSS-DART: failed to transform “scss/main.scss” (text/x-scss). You need dart-sass-embedded in your system $PATH.: this feature is not available in your current Hugo version, see Frequently asked questions | Hugo for more information
Built in 277 ms
I got
$ sass --version
1.49.9
$ which hugo
/usr/local/bin/hugo
I edited the .bashrc file in
export PATH=$PATH:/usr/local/bin/hugo
I’m not sure if I’m adding the path right. Could you please tell me?
under usr/local/bin directory also, I extracted both sass and hugo
this is using homebrew:
:~/Desktop/Websites/myWebsite$ sass --version
1.49.9 compiled with dart2js 2.16.1
:~/Desktop/Websites/myWebsite$ which sass
/home/myUserName/.linuxbrew/bin/sass
:~/Desktop/Websites/myWebsite$ hugo version
hugo v0.96.0+extended linux/amd64 BuildDate=unknown
:~/Desktop/Websites/myWebsite$ which hugo
/home/myUserName/.linuxbrew/bin/hugo
You overwrite your dart-sass with the last sass. Choose one.
If you just wish to make Sass NOT use the internal function, follow the advise in this stackoverflow post:
It’s only related, but the basic method stays. You have to override the internal sass function to get features that the used Sass version doesn’t know.
Or maybe just remove the “SASS TO PATH” part, because dart-sass is sass - no guarantee it will work then.