Help with Dart Sass

I’m running the following version of hugo

$ hugo version
hugo v0.143.1-0270364a347b2ece97e0321782b21904db515ecc+extended darwin/arm64 BuildDate=2025-02-04T08:57:38Z VendorInfo=gohugoio

and I’m trying to build this project Scientific Python Hugo Theme documentation - Get Started . I installed sass using the following:

$ npm install -g sass

but when I run hugo server:

ERROR TOCSS-DART: failed to transform "theme-css/sphinx-design/index.scss.css" (text/x-scss): got unexpected EOF when executing "sass". The user running hugo must have read and execute permissions on this program. With execute permissions only, this error is thrown.
ERROR TOCSS-DART: failed to transform "theme-css/pst/pydata-sphinx-theme.scss.css" (text/x-scss): "<stream>:1:1": connection is shut down
ERROR TOCSS-DART: failed to transform "theme-css/spht/index.scss.css" (text/x-scss): "<stream>:1:1": connection is shut down
Total in 230 ms
Error: error building site: TOCSS-DART: failed to transform "theme-css/pst/bootstrap.scss.css" (text/x-scss): "<stream>:1:1": connection is shut down

I tried following the answer in this thread but was unable to get things working.

Indeed:

$ sass --embedded --version
sass --embedded is unavailable in pure JS mode.

Uninstall, then install using these instructions:
https://gohugo.io/functions/css/sass/#dart-sass

Do not install via npm.

https://github.com/sass/dart-sass?tab=readme-ov-file#usage

The --embedded command-line flag is not available when you install Dart Sass as an npm package.

1 Like

Thank you, installing with brew worked