{"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":"validation","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/8a468df065a75c1c7cf9f6850f32148746590ea5/tpl/css/css.go#L150-L186","documentation":"css.Sass accepts a transpiler option that must be either \"libsass\" or \"dartsass\". Any other value is rejected. Note libsass is the (deprecated as of v0.153.0) default; dartsass is the recommended value going forward and requires the Dart Sass binary to be installed.","triggerScenarios":"Passing (dict \"transpiler\" X) to css.Sass / toCSS where X is not exactly libsass or dartsass — e.g. \"dart-sass\", \"dart\", \"sass\", a typo, or a non-string that stringifies unexpectedly.","commonSituations":"Users following the libsass-deprecation notice write \"dart-sass\" or \"dart sass\" (the binary's name) instead of the option value \"dartsass\"; config values interpolated from site params can also carry wrong casing-insensitive-but-wrong strings.","solutions":["Set the option to exactly \"dartsass\" (or \"libsass\"): {{ $opts := dict \"transpiler\" \"dartsass\" }}.","Install Dart Sass and ensure the 'sass' binary is on PATH when switching to dartsass.","If the value comes from site config/params, verify the param actually contains one of the two accepted strings."],"exampleFix":"{{/* before */}}\n{{ $css := $scss | css.Sass (dict \"transpiler\" \"dart-sass\") }}\n\n{{/* after */}}\n{{ $css := $scss | css.Sass (dict \"transpiler\" \"dartsass\") }}","handlingStrategy":"validation","validationCode":"{{ $t := .Site.Params.transpiler | default \"libsass\" }}\n{{ if not (in (slice \"libsass\" \"dartsass\") $t) }}\n  {{ errorf \"invalid transpiler %q; use libsass or dartsass\" $t }}\n{{ end }}\n{{ $opts := dict \"transpiler\" $t }}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Whitelist transpiler values (libsass/dartsass) before building the options dict","If using dartsass, verify the dart-sass binary is installed via `hugo env`","Fail fast with errorf on bad config values instead of letting the pipeline error deep in css.Sass"],"tags":["hugo","css","sass","dartsass","configuration"],"analyzedSha":"8a468df065a75c1c7cf9f6850f32148746590ea5","analyzedAt":"2026-07-31T21:23:07.045Z","schemaVersion":2}