{"id":"1232d53cadbbadcd","repo":"gohugoio/hugo","slug":"unsupported-dart-sass-version-detected-please-upg","errorCode":null,"errorMessage":"unsupported Dart Sass version detected, please upgrade to Dart Sass 1.63.0 or later, see https://gohugo.io/functions/css/sass/#dart-sass","messagePattern":"unsupported Dart Sass version detected, please upgrade to Dart Sass 1\\.63\\.0 or later, see https://gohugo\\.io/functions/css/sass/#dart-sass","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"resources/resource_transformers/tocss/dartsass/client.go","lineNumber":56,"sourceCode":"\n// used as part of the cache key.\nconst transformationName = \"tocss-dart\"\n\n// See https://github.com/sass/dart-sass-embedded/issues/24\n// Note: This prefix must be all lower case.\nconst dartSassStdinPrefix = \"hugostdin:\"\n\nfunc New(fs *filesystems.SourceFilesystem, rs *resources.Spec) (*Client, error) {\n\tif !Supports() {\n\t\treturn &Client{}, nil\n\t}\n\n\tif hugo.DartSassBinaryName == \"\" {\n\t\treturn nil, fmt.Errorf(\"no Dart Sass binary found in $PATH\")\n\t}\n\n\tif !hugo.IsDartSassGeV2() {\n\t\treturn nil, fmt.Errorf(\"unsupported Dart Sass version detected, please upgrade to Dart Sass 1.63.0 or later, see https://gohugo.io/functions/css/sass/#dart-sass\")\n\t}\n\n\tif err := rs.ExecHelper.Sec().CheckAllowedExec(hugo.DartSassBinaryName); err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar (\n\t\ttranspiler *godartsass.Transpiler\n\t\terr        error\n\t\tinfol      = rs.Logger.InfoCommand(\"Dart Sass\")\n\t\twarnl      = rs.Logger.WarnCommand(\"Dart Sass\")\n\t)\n\n\ttranspiler, err = godartsass.Start(godartsass.Options{\n\t\tDartSassEmbeddedFilename: hugo.DartSassBinaryName,\n\t\tLogEventHandler: func(event godartsass.LogEvent) {\n\t\t\tmessage := strings.ReplaceAll(event.Message, dartSassStdinPrefix, \"\")\n\t\t\tswitch event.Type {","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/gohugoio/hugo/blob/8a468df065a75c1c7cf9f6850f32148746590ea5/resources/resource_transformers/tocss/dartsass/client.go#L38-L74","documentation":"Raised when a Dart Sass binary is found but hugo.IsDartSassGeV2() reports it is older than 1.63.0 — the first release embedding the Embedded Sass protocol v2 into the main `sass` executable. Hugo (since v0.115+) talks that protocol, so older standalone `dart-sass-embedded` or pre-1.63 `sass` binaries cannot be used.","triggerScenarios":"Client construction for the dartsass transpiler where the discovered binary is `sass` < 1.63.0 or the legacy `dart-sass-embedded` executable; the version gate fails before any compilation starts.","commonSituations":"Upgrading Hugo while keeping an old dart-sass-embedded install (common after Hugo 0.115 removed embedded-binary support), pinned CI cache with a stale sass version, or distro packages shipping outdated dart-sass.","solutions":["Upgrade to Dart Sass 1.63.0+ (`brew upgrade sass/sass/sass`, `npm i -g sass@latest`, or a fresh release download) and remove any old `dart-sass-embedded` from PATH","Verify with `sass --embedded --version` that the new binary is the one Hugo finds first in $PATH","Update CI caches/images that pin an old dart-sass version; see https://gohugo.io/functions/css/sass/#dart-sass"],"exampleFix":"# before\nsass --version   # 1.58.3\n# after\nnpm i -g sass@latest\nsass --version   # 1.77.x (>= 1.63.0)","handlingStrategy":"validation","validationCode":"sass --version | awk '{print $1}' # require >= 1.63.0 before building","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin dart-sass >= 1.63.0 in your toolchain/CI install step","Check sass --version in a preflight script and fail fast with an upgrade hint","Remove legacy dart-sass-embedded binaries from PATH — Hugo needs the modern `sass` CLI protocol","Re-verify the version after OS package-manager updates, which can ship older dart-sass"],"tags":["hugo","dart-sass","versioning","environment","upgrade"],"analyzedSha":"8a468df065a75c1c7cf9f6850f32148746590ea5","analyzedAt":"2026-07-31T21:23:07.045Z","schemaVersion":2}