Start building sites …
hugo v0.84.2+extended linux/amd64 BuildDate=2021-06-28T15:14:06Z
Total in 59 ms
Error: Error building site: TOCSS-DART: failed to transform “scss/main.scss” (text/x-scss). You need dart-sass-embedded in your system $PATH.
Any insight on this matter would be most gratefully received.
“Who” is running hugo? Your user or some other user? Maybe add a script that runs echo $PATH and then executes hugo, so that you see what exactly is in Hugo’s user’s path. Your issue points to the program NOT being in Hugo’s system path.
I am running Hugo too with dart-sass, but I install the Dart SDK (via snap) and then no additional issues come up. I also don’t have a dart-sass-embedded in my environment. Maybe go that route?
I don’t see the Dart SDK on snapcraft, so wondering where/how you found it as a snap. I did install the Dart SDK via the regular .deb package. That unfortunately didn’t change anything, and the same error is being returned.
I also wrote a little shell script along the lines of:
As I expected, it returns the same output as when I execute the same commands manually.
I do agree that there is some confusion around which user hugo is running under, but given that I’m executing it myself, I would assume that it is running as me, with all the same $PATH juice as any other command gets when I run it.