hugo-saasify-theme icon indicating copy to clipboard operation
hugo-saasify-theme copied to clipboard

can't evaluate field PostCSS in type interface {}

Open fvlasie opened this issue 10 months ago • 2 comments

When running npm run start I get the ERROR execute of template failed: template: _default/list.html:60:21: executing "_default/list.html" at : can't evaluate field PostCSS in type interface {}

Thank you for a great theme!

fvlasie avatar Feb 13 '25 06:02 fvlasie

What is your hugo version? Need to have an up to date version to use PostCSS https://discourse.gohugo.io/t/cant-evaluate-field-postprocess-in-type-interface-when-using-snippet-from-docs/25170

Have you installed all the npm packages? Your package.json should look like this. Then run npm install https://github.com/chaoming/hugo-saasify-theme/blob/main/package.json

rossdonald avatar Feb 13 '25 08:02 rossdonald

I had the same problem. I rolled back this commit:

https://github.com/chaoming/hugo-saasify-theme/commit/738f2ce37577e54a98e7060e5e8f7f4f00bddfc7

and then i stopped getting the error

When line 60 of the baseof.html reads:

{{ $css = $css | resources.PostCSS }}

the site builds ok.

The commit says that there will be an issue in a future version of HUGO but not yet it seams.

albanytech avatar Feb 25 '25 18:02 albanytech