TOCSS: failed to transform "style.scss"

Hi, I know this happened quite a lot so far but I can’t find a solution to my issue.

First of all I’ve been able to build my them so far without issues.

Today I started getting this error

Error: Error building site: TOCSS: failed to transform "style.scss" (text/x-scss). Check your Hugo installation; you need the extended version to build SCSS/SASS with transpiler set to 'libsass'.: this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information

I checked my version and it should be fine ( it says Extended)

My repo is at

I am not using npm so far and I would not, so I didn’t find useful the solutions regarding npm package ToCSS.

Can someone help me please?

My version is same as yours:

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

No issues building the site in your repo.

@frjo this is what I get when the build starts today

Run hugo --minify
WARN 2022/12/26 13:36:02 Module "project" is not compatible with this Hugo version; run "hugo mod graph" for more information.
Start building sites … 
hugo v0.109.0-47b12b83e636224e5e601813ff3e6790c191e371 linux/amd64 BuildDate=2022-12-23T10:38:11Z VendorInfo=gohugoio
Error: Error building site: TOCSS: failed to transform "style.scss" (text/x-scss). Check your Hugo installation; you need the extended version to build SCSS/SASS with transpiler set to 'libsass'.: this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information
Total in 58 ms
Error: Process completed with exit code 255.

the last success build 2 weeks ago was


The green one wasn’t an Extended version. Today I started getting this error so I upgraded it to an extended version but no luck

@frjo
One thing I forgot to underline!
I am able to build it running hugo server. The issue is when I try to push it.


Thanks!

@bep would you be able to help ? I see you already provided a way about this issue. Unfortunately upgrading to an extended version didn’t help. Thanks!

Still trying to debug. I can minify locally too. Running out of ideas at this point

Uncomment this line:
https://github.com/DamBasement/hugo-blog/blob/main/.github/workflows/gh-pages.yml#L22

In the future, it would be helpful to explain where your build was failing.

1 Like

Fixed it. If you can call you a fix I hardcoded in the hugo version of the gh-pages.yml the version to use.
0.108.0.
it worked like a charm. A total mess using 0.109.0
Cheers!

@jmooring as I said before, when the build start.

The extended parameter left commented didn’t hurt. The problem is the version.

My point was, you didn’t state that the problem was limited to building your site on GitHub pages. That would have been helpful.

For anyone else stumbling across this post, this is completely unrelated to v0.108.0 vs. v0.109.0.

The problem was with the GitHub pages configuration file.

Incorrect:

- name: Setup Hugo
  uses: peaceiris/actions-hugo@v2
  with:
    hugo-version: 'latest'
    # extended: true

Correct:

- name: Setup Hugo
  uses: peaceiris/actions-hugo@v2
  with:
    hugo-version: 'latest'
    extended: true

Here’s a clone of the repo with the correction:
https://github.com/jmooring/hugo-forum-topic-42096

And GitHib Pages builds the site as exected:
https://jmooring.github.io/hugo-forum-topic-42096/

1 Like

@proton

Because you are checking the resources directory into source control, Hugo doesn’t need the extended version if the cache is warm. But when the cache is cold, Hugo needs to transpile the SASS to CSS again, and it cannot do that without the extended version.

Ok gotcha. thanks for the explanation I didn’t get your point at the start!

Thanks again!

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