I recently started to see this error after upgrading to the latest version 0.123.4. I’ve confirmed on an older version running 0.99 where I do not see the same error while serving the same project files. Is it possible that a recent update might have caused this? Maybe there is something I need to update in my Hugo files, or possibly an issue with DartSASS? Thank you for looking.
ERROR TOCSS-DART: failed to transform "/scss/styles.scss" (text/x-scss): "<stream>:1:1": proto: cannot parse invalid wire-format data
Hello, I believe I see part of the problem. I have dart sass embedded installed which it looks like it only works up to 0.114. Confirmed by running which sass. /usr/local/bin/sass
Sounds like that is the outdated way of installing dart sass. I’m guessing I should delete that bin folder now?
I do have sass installed via Brew, but it’s unclear if it is dart sass. Is that the libsass that is showing in the env output?
The libsass entry reports Hugo’s embedded libsass library.
If Dart Sass were installed, embedded or not, it would show up when you run hugo env.
I recommend you uninstall all instances of Sass, install Dart Sass per the documentation that I linked to above, and test that it’s in your path by typing “sass --embedded --version” from the command line. The current version of Dart Sass is 1.71.0.
Thank you for your help. I realize my next question is not Hugo related, but would appreciate any insight you might have. Currently, I’m unable to install the latest version of Dart Sass. And without the correct Dart SDK, I’m unable to install Dart Sass.
The current Dart SDK version is 2.18.6.
Because sass requires SDK version >=3.0.0 <4.0.0, version solving failed.
It’s unclear why, but when I install Dart through Brew it will only install 2.18.6. I’m unable to upgrade to the latest version above 3.0 that the error asks for. I’ve attempted to uninstall Dart and it still shows as installed. There appears to be no way to completely clear out the old version. Any thoughts on that?
I’m now noticing odd behavior after uninstalling Sass and Dart with Brew. You can see that Hugo is referencing Dart Sass Embedded which it wasn’t earlier.
I would like to remove the embedded version to align with the Hugo requirement. The problem is I don’t remember how I installed embedded other than including it in a bin folder. I vaguely remember having to change the $PATH somewhere on my system to reference this.
Way back then, I think the only way you could have installed it was by manually placing the bin file in one of the directories listed in your PATH environment variable, or perhaps you created new directory that you then added to your PATH environment variable.
Look at your PATH environment variable; that may give you a clue.
Yeah, I see the folder path in Finder with the embedded files. Is it ok to manually delete that folder? If so, do I need to remove the reference in $PATH? Whenever I try to install the newer version of Sass it still wants to reference that embedded version.
I would like to remove the path. I’ve been searching and the closest thing I can find is something about export $PATH. Do you know what the entry would be to remove the full path above?
Yes, you can safely remove the sass_embedded directory.
Given the nature of your questions, I am uncomfortable describing how to modify your PATH. You could easily do some damage and I don’t want to be the cause of that. I suggest you leave the PATH variable as is, or investigate on your own how to modify it.
Sure, I understand. If I remove the files but leave the directory, will I be able use other versions of Sass or will it keep referencing embedded because of that $PATH?
The PATH environment variable is a list of directories (entries) that the operating searches when looking for an executable. Non-existent paths are ignored.