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 building site: POSTCSS: failed to transform "style.css" #830

Closed kosli closed 3 years ago

kosli commented 3 years ago

Is this a BUG REPORT or FEATURE REQUEST?: bug

What happened: I am following the installation instruction to get a sample syna site up and running but get the following error when starting hugo:

hugo server -D
Start building sites …
WARN 2020/10/09 18:42:26 .File.Dir on zero object. Wrap it in if or with: {{ with .File }}{{ .Dir }}{{ end }}
Built in 552 ms
Error: Error building site: POSTCSS: failed to transform "style.css" (text/css): resource "scss/styles/index.scss_02bf14281ac065540fcc7ecc15ca70a4" not found in file cache

What you expected to happen: A successful start of the hugo server :-)

How to reproduce it (as minimally and precisely as possible): Based on https://about.okkur.org/syna/docs/installation/

git clone --recurse-submodules https://git.okkur.org/syna-start
cd syna-start
hugo server -D

Anything else we need to know?: As I am using the extended version of hugo, I don't know what else could be the problem?

Environment:

kosli commented 3 years ago

Thanks to #813 and installing npm install postcss-cli I got it finally working. As this is an external dependency, this should explicitly be mentioned on the installation guide at https://about.okkur.org/syna/docs/installation/ You can close this issue, or leave it open as reminder to update the installation guide. Thanks.

stp-ip commented 3 years ago

We have an open PR that should remove that dependency, but it didn't make it in yet. Will leave this open until we have the docs changed or the PR and therefore the hard dependency need removed. Thanks for the heads up.

Always happy for more feedback and even PRs :)

stp-ip commented 3 years ago

816

stp-ip commented 3 years ago

This should be fixed with the ongoing release of 0.17.4

davidmweber commented 3 years ago

I still see this error in 0.17.4

davidmweber commented 3 years ago

I have nailed this down to needing hugo extended. On Ubuntu Linux, apt get lands you the non-extended version. Use snap install hugo --channel=extended and the problem is solved.

stp-ip commented 3 years ago

Thanks for clarifying. Yes Hugo extended is necessary. But postcss-cli shouldn't be anymore.