gohugoio/hugo · error
unsupported Dart Sass version detected, please upgrade to Da
Error message
unsupported Dart Sass version detected, please upgrade to Dart Sass 1.63.0 or later, see https://gohugo.io/functions/css/sass/#dart-sass
What it means
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.
Source
Thrown at resources/resource_transformers/tocss/dartsass/client.go:56
// used as part of the cache key.
const transformationName = "tocss-dart"
// See https://github.com/sass/dart-sass-embedded/issues/24
// Note: This prefix must be all lower case.
const dartSassStdinPrefix = "hugostdin:"
func New(fs *filesystems.SourceFilesystem, rs *resources.Spec) (*Client, error) {
if !Supports() {
return &Client{}, nil
}
if hugo.DartSassBinaryName == "" {
return nil, fmt.Errorf("no Dart Sass binary found in $PATH")
}
if !hugo.IsDartSassGeV2() {
return 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")
}
if err := rs.ExecHelper.Sec().CheckAllowedExec(hugo.DartSassBinaryName); err != nil {
return nil, err
}
var (
transpiler *godartsass.Transpiler
err error
infol = rs.Logger.InfoCommand("Dart Sass")
warnl = rs.Logger.WarnCommand("Dart Sass")
)
transpiler, err = godartsass.Start(godartsass.Options{
DartSassEmbeddedFilename: hugo.DartSassBinaryName,
LogEventHandler: func(event godartsass.LogEvent) {
message := strings.ReplaceAll(event.Message, dartSassStdinPrefix, "")
switch event.Type {View on GitHub ↗ (pinned to 8a468df065)
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
Example fix
# before sass --version # 1.58.3 # after npm i -g sass@latest sass --version # 1.77.x (>= 1.63.0)
Defensive patterns
Strategy: validation
Validate before calling
sass --version | awk '{print $1}' # require >= 1.63.0 before building Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- no Dart Sass binary found in $PATH
- deploy not supported in this version of Hugo; install a rele
- failed to resolve output path %q: %w
- module workspace %q does not exist. Check your module.worksp
- got unexpected EOF when executing %q. The user running hugo
AI-assisted analysis of gohugoio/hugo@8a468df065 (2026-07-31).
Data as JSON: /data/errors/1232d53cadbbadcd.json.
Report an issue: GitHub ↗.