Error - TOCSS: failed to transform "style.sass" (text/x-sass)

HUGO v0.47.1 running on Windows.

Following quick start - works just fine with Ananke theme.

Trying to use hugo-fresh theme but on running

hugo server

get error message

Full Error - failed to transform resource: TOCSS: failed to transform "style.sass" (text/x-sass):
this feature is not available in your current Hugo version

Not sure where to start here - is it a problem with the theme or with my installation? (guessing PIPES for sass files but not sure where to start looking)

SOLVED - its because I didn’t download the extended version of HUGO

5 Likes

Remove --tags extended if you do not want/need Sass/SCSS support

I install by open source.

mkdir $HOME/src
cd $HOME/src
git clone https://github.com/gohugoio/hugo.git
cd hugo
go install --tags extended

Hi,

I’m at my wits end. I get the this error:
… failed to transform resource: TOCSS: failed to transform “scss/main.scss” (text/x-scss): this feature is not available in your current Hugo version…

I read all the blogs and I have the extended version (I think):
$ hugo version
Hugo Static Site Generator v0.53/extended darwin/amd64 BuildDate: unknown
and I did the “?npm install -g postcss-cli” and all their variations, -D, sudo, …

but I keep having the problem

What does work is:
{{ $styles := resources.Get “scss/main.scss”}}

but it stops working when I add the " | toCSS"

regards
Steven

Try renaming the folder to sass instead of scss. I remember having the same issues. It’s semantics :wink:
(resulting paths in your templates of course too)

Nope, didn’t work. :disappointed_relieved:

What is the EXACT error message AFTER you change the folder to sass? (At least your version paste confirmed that you have extended installed. So this is not the issue here.)

wait, of course rename the files into .sass too, not just the folder. sorry, my fault.

sorry same thing
this is my full output:

victor-hugo@1.0.0 start /Users/me/Sites/SITE-HUGO/awardt-hugo-cms
gulp server

[15:54:27] Failed to load external module @babel/register
[15:54:27] Requiring external module babel-register
[15:54:28] Using gulpfile ~/Sites/SITE-HUGO/awardt-hugo-cms/gulpfile.babel.js
[15:54:28] Starting 'hugo'...
[15:54:28] Starting 'css'...
Building sites … ERROR 2019/02/03 15:54:28 error: failed to transform resource: TOCSS: failed to transform "sass/main.sass" (text/x-sass): this feature is not available in your current Hugo version
Total in 17 ms
Error: Error building site: logged 1 error(s)
[15:54:29] Starting 'js'...
[15:54:29] Starting 'svg'...
[15:54:29] 'hugo' errored after 872 ms
[15:54:29] Error: Hugo build failed
    at formatError (/Users/me/Sites/SITE-HUGO/awardt-hugo-cms/node_modules/gulp/bin/gulp.js:169:10)
    at Gulp.<anonymous> (/Users/me/Sites/SITE-HUGO/awardt-hugo-cms/node_modules/gulp/bin/gulp.js:195:15)
    at emitOne (events.js:116:13)
    at Gulp.emit (events.js:211:7)
    at Gulp.Orchestrator._emitTaskDone (/Users/me/Sites/SITE-HUGO/awardt-hugo-cms/node_modules/orchestrator/index.js:264:8)
    at /Users/me/Sites/SITE-HUGO/awardt-hugo-cms/node_modules/orchestrator/index.js:275:23
    at finish (/Users/me/Sites/SITE-HUGO/awardt-hugo-cms/node_modules/orchestrator/lib/runTask.js:21:8)
    at cb (/Users/me/Sites/SITE-HUGO/awardt-hugo-cms/node_modules/orchestrator/lib/runTask.js:29:3)
    at ChildProcess.<anonymous> (/Users/me/Sites/SITE-HUGO/awardt-hugo-cms/gulpfile.babel.js:90:7)
    at emitTwo (events.js:126:13)
[15:54:29] gulp-inject 1 file into svg.html.
[15:54:29] Finished 'svg' after 91 ms
[15:54:31] [webpack] Hash: 895b23441826dfbc1d86
Version: webpack 3.12.0
Time: 2016ms
 Asset     Size  Chunks                    Chunk Names
cms.js  2.94 MB       0  [emitted]  [big]  cms
app.js  2.89 kB       1  [emitted]         app
   [0] ./node_modules/react/index.js 190 bytes {0} [built]
   [9] multi ./js/app 28 bytes {1} [built]
  [10] ./src/js/app.js 270 bytes {1} [built]
  [11] multi ./js/cms 28 bytes {0} [built]
  [12] ./src/js/cms.js 3.55 kB {0} [built]
  [13] ./node_modules/react/cjs/react.production.min.js 6.23 kB {0} [built]
  [14] ./node_modules/react/cjs/react.development.js 62.8 kB {0} [built]
  [17] ./node_modules/netlify-cms/dist/netlify-cms.js 2.63 MB {0} [built]
  [18] ./node_modules/imports-loader?this=>global!./node_modules/exports-loader?global.fetch!./node_modules/whatwg-fetch/fetch.js 13.2 kB {0} [built]
  [20] ./src/js/cms-preview-templates/home.js 6.62 kB {0} [built]
  [34] ./src/js/cms-preview-templates/post.js 3.68 kB {0} [built]
  [35] ./src/js/cms-preview-templates/products.js 9.56 kB {0} [built]
  [36] ./src/js/cms-preview-templates/values.js 4.48 kB {0} [built]
  [37] ./node_modules/immutable/dist/immutable.js 142 kB {0} [built]
  [38] ./src/js/cms-preview-templates/contact.js 3.75 kB {0} [built]
    + 24 hidden modules
[15:54:31] Finished 'js' after 2.07 s
[15:54:32] Finished 'css' after 3.67 s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! victor-hugo@1.0.0 start: `gulp server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the victor-hugo@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

These lines tell me that something else is calling a hugo and a css job. You should make your repo public to let people see what exactly your build script is doing.

What COULD be is that you have a local hugo install that is older than the scss features and a global version that is up-to-date but unused. My hugo run never says anything like “Starting ‘css’” so it must be something in your gulp setup. Without public repo nobody knows what is going on in your install.

First, I am a NOOB with Hugo and trying to create my first site for a friend. So forgive me my “stupid” stuff. It’s also going to be full of things I no longer use.
Second, I’m using netlifycms. Could that be an issue?


and while writing my second point

I found that it’s related with the netlify cms. Investigating further

I’ve also been having this problem on Netlify. I struggled with it, but then realized it was dude to my build settings.

I had been using the old Ubuntu and when I switched to Ubuntu Xenial 16.04 (default) everything worked great!