How to install hugo extended via snap?

Hello,

When I tried to update our hugo website, I got a strange error.

Start building sites …
hugo v0.109.0-47b12b83e636224e5e601813ff3e6790c191e371 linux/amd64 BuildDate=2022-12-23T10:38:11Z VendorInfo=snap:0.109.0
ERROR 2022/12/31 11:55:48 TOCSS: failed to transform "scss/style-ar.scss" (text/x-scss). Check your Hugo installation; you need the extended version to build SCSS/SASS with transpiler set to 'libsass'.: this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information
Error: Error building site: TOCSS: failed to transform "scss/style.scss" (text/x-scss). Check your Hugo installation; you need the extended version to build SCSS/SASS with transpiler set to 'libsass'.: this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information
Total in 441 ms

I have the version:

hugo v0.109.0-47b12b83e636224e5e601813ff3e6790c191e371 linux/amd64 BuildDate=2022-12-23T10:38:11Z VendorInfo=snap:0.109.0

I did some investigation and the following page says I need to install the extended version of hugo. I don’t know why it was working until recently and what changed.

This is how I had installed Hugo on my Debian server:

sudo apt update
sudo apt install snapd
sudo snap install core
sudo snap install hugo

How do I install the extended version via snap? Do I have to uninstall the current version?

Many Thanks

sudo snap remove hugo
sudo snap install hugo

I suspect you installed the snap a long time ago, when sudo snap install hugo installed the standard edition. The standard edition does not include a Sass transpiler. At some point we changed the default snap package to the extended edition, so the commands above will move you from standard to extended.

The upgrade to v0.109.0 invalidated the cached results (for a Very Good Reason) of an earlier Sass transpilation (perhaps by the theme author), so it is necessary to transpile again. Hence the need for the extended version.