okkur / syna

Highly customizable open source theme for Hugo based static websites
https://syna.okkur.org/demo/
Apache License 2.0
250 stars 133 forks source link

Error: Error building site: TOCSS: failed to transform "main.scss" #796

Closed certik closed 4 years ago

certik commented 4 years ago

Is this a BUG REPORT or FEATURE REQUEST?: bug

What happened:

$ cd themes/syna/exampleSite
$ hugo --ignoreCache
Building sites … WARN 2020/07/09 16:58:09 .File.Dir on zero object. Wrap it in if or with: {{ with .File }}{{ .Dir }}{{ end }}
Total in 540 ms
Error: Error building site: TOCSS: failed to transform "main.scss" (text/x-scss): resource "scss/styles/index.scss_a4e369375f17bb89f2019364cbe7a830" not found in file cache

If you remove --ignoreCache then it works.

What you expected to happen:

I expected the website to regenerate the cache.

How to reproduce it (as minimally and precisely as possible):

See above.

Anything else we need to know?:

Environment:

ukorn commented 4 years ago

This affects me too.

Syna Theme version: https://github.com/okkur/syna/commit/2826c48e1a456da37a78e6727c80ea2dc78aee1b Hugo version: 0.73.0-428907CC windows/amd64 Others: Windows 10 2004

mpourismaiel commented 4 years ago

Are you using Hugo extended version? We build SASS files and do other build processes that are only possible in Hugo extended version. We build files with every change to our assets to make sure users without extended version of Hugo can still build their websites but that requires you to not use --ignoreCache.

If you're already using extended version, please let me know how to reproduce the issue. I am able to build the project without any issues.

ukorn commented 4 years ago

Solved it for me,

thanks a lot.

certik commented 4 years ago

I verified that downloading Hugo extended fixed this issue. I haven't heard of the extended version until now.

mpourismaiel commented 4 years ago

Happy to hear it works. Extended version has Sass and Postcss and stuff like that allowing to unify most of the build process. Nothing special really.