bep/galleriesdeluxe

Got "Error: error building site: TOCSS-DART: failed to transform "scss/galleriesdeluxe/styles.scss" (text/x-scss): "<stream>:1:1": proto: cannot parse invalid wire-format data" error when building the site

Closed this issue · 2 comments

lamons commented

I am trying to build from freshly cloned example site on my Mac (macOS 13.3.1) and encounter this error:

Error: error building site: TOCSS-DART: failed to transform "scss/galleriesdeluxe/styles.scss" (text/x-scss): "<stream>:1:1": proto: cannot parse invalid wire-format data

Hugo version:
hugo v0.115.4+extended darwin/amd64 BuildDate=unknown
sass --version 1.32.11

You will have to update SASS to version 1.6x or greater. DART-SASS has some upstream packaging changes which are causing this problem.

Here is how I fixed it.

  1. Download Dart-Sass from the Github releases page.
  2. After extracting the files, you will get this.
dart-sass
├── sass
└── src
    ├── LICENSE
    ├── dart
    └── sass.snapshot
  1. Move the contents of the folder to somewhere in your $PATH. I moved them to ~/.bin which I have added to my $PATH
~/.bin
├── sass
└── src
    ├── LICENSE
    ├── dart
    └── sass.snapshot
  1. That's it. In a new terminal you should be able to run the hugo command and have everything running.
bep commented

@iHarshad is right -- I did however push a new version that allows you to run with the built-in libsass compiler. Add this to your site config:

[params]
    [params.galleriesdeluxe]
        # One of dartsass or libsass.
        sass_transpiler = "libsass"