This feature is not available in your current Hugo version


#1

Hi,

Firstly great news with Hugo Pipes and support for SASS.

I have downloaded the latest Windows extended version (hugo_extended_0.43_Windows-64bit.zip) of Hugo to test implementing SASS. If I run “hugo env” I see the following:

Hugo Static Site Generator v0.44-DEV/extended windows/amd64 BuildDate: unknown
GOOS=“windows”
GOARCH=“amd64”
GOVERSION=“go1.10.3”

However if I create a new site, add the ananke theme and create a scss file:

\themes\ananke\assets\scss\main.scss

I get the following serve error:

Building sites … ERROR 2018/07/10 12:18:21 error: failed to transform resource: failed to transform “scss/main.css” (text/css): this feature is not available in your current Hugo version

Am I doing something wrong? I thought the latest extended version had scss support.


#2

Did you use

{{ $styles := resources.Get "scss/main.scss" | toCSS | postCSS | minify | fingerprint }}

Same happened to me. If you take postCSS away it worked for me. Don’t know the reason yet


#3

You guys need to npm install both postcss-cli and whatever PostCSS plugin(s) your are listing in you postcss.config.js file.

Contrary to ToCSS, PostCSS is “node” dependent.


#4

Thanks Regis. I have run:

npm install -g postcss-cli

in the root of my test site and it now builds. :grinning:

Might be worth adding this to the pipes news article for anyone starting out with Hugo.


#5

Agree, please add it, @mattjones. :slight_smile:


#6

Yes, for example:

> npm install -g postcss-cli
> npm install -g autoprefixer

#7