{"record":{"id":"72dd6f75aa6a7240","repo":"gohugoio/hugo","slug":"unsupported-transpiler-q-valid-values-are-q-or","errorCode":null,"errorMessage":"unsupported transpiler %q; valid values are %q or %q","messagePattern":"unsupported transpiler %q; valid values are %q or %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"tpl/css/css.go","lineNumber":168,"sourceCode":"\tr, targetPath, ok = resourcehelpers.ResolveIfFirstArgIsString(args)\n\n\tif !ok {\n\t\tr, m, err = resourcehelpers.ResolveArgs(args)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif m != nil {\n\t\tif t, _, found := hmaps.LookupEqualFold(m, \"transpiler\"); found {\n\t\t\tswitch t {\n\t\t\tcase sass.TranspilerDart:\n\t\t\t\ttranspiler = cast.ToString(t)\n\t\t\tcase sass.TranspilerLibSass:\n\t\t\t\thugo.Deprecate(\"css.Sass: libsass\", \"Use dartsass instead. See https://gohugo.io/functions/css/sass/#dart-sass\", \"v0.153.0\")\n\t\t\t\ttranspiler = cast.ToString(t)\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"unsupported transpiler %q; valid values are %q or %q\", t, sass.TranspilerLibSass, sass.TranspilerDart)\n\t\t\t}\n\t\t}\n\t}\n\n\tif transpiler == sass.TranspilerLibSass {\n\t\tvar options scss.Options\n\t\tif targetPath != \"\" {\n\t\t\toptions.TargetPath = paths.ToSlashTrimLeading(targetPath)\n\t\t} else if m != nil {\n\t\t\toptions, err = scss.DecodeOptions(m)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\n\t\treturn ns.scssClientLibSass.ToCSS(r, options)\n\t}\n","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/gohugoio/hugo/blob/52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2/tpl/css/css.go#L150-L186","documentation":"`css.Sass` (css.go:159-169) reads an optional `transpiler` key from the options map (case-insensitive via `hmaps.LookupEqualFold`). Valid values are the string constants `sass.TranspilerLibSass` (`\"libsass\"`) and `sass.TranspilerDart` (`\"dartsass\"`). Any other value reaches the `default` arm and returns this error quoting the bad value and the two valid choices. Note `libsass` is deprecated (v0.153.0+) in favor of `dartsass`.","triggerScenarios":"`{{ $css := $main | css.Sass (dict \"transpiler\" \"sass\") }}`, `{{ ... | css.Sass (dict \"transpiler\" \"node\") }}`, or a typo.","commonSituations":"Using `\"sass\"` or `\"ruby\"`/`\"node-sass\"`; uppercase `\"DartSass\"`; migrating to dartsass but misspelling it.","solutions":["Set `transpiler` to `\"dartsass\"` (recommended) or `\"libsass\"` (legacy).","Remove the `transpiler` key to accept the default (currently libsass, migrating to dartsass).","Ensure the dart-sass binary is installed when using `dartsass`."],"exampleFix":"// before\n{{ $css := $main | css.Sass (dict \"transpiler\" \"sass\") }}\n// after\n{{ $css := $main | css.Sass (dict \"transpiler\" \"dartsass\") }}","handlingStrategy":"validation","validationCode":"{{/* Valid transpilers: dartsass (recommended), libsass (deprecated) */}}\n{{ $main | css.Sass (dict \"transpiler\" \"dartsass\") }}\n{{ $main | css.Sass }} {{/* default */}}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use `dartsass` for new projects; `libsass` is deprecated.","Ensure the dart-sass binary is on PATH when using dartsass.","Omit the transpiler key to accept the default if you have no preference."],"tags":["hugo","go-templates","css","sass","transpiler","invalid-argument"],"backgroundTag":null,"analyzedSha":"52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2","analyzedAt":"2026-08-09T21:49:36.660Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}