okkur/syna

Error building site: POSTCSS: failed to transform "style.css"

kosli opened this issue · 7 comments

kosli commented

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:

  • Syna Theme version: 0.17.3
  • Hugo version: Hugo Static Site Generator v0.76.3-E9623459/extended linux/amd64 BuildDate: 2020-10-08T17:17:16Z
  • Others: Linux Mint 20 (ulyana)
kosli commented

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.

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 :)

This should be fixed with the ongoing release of 0.17.4

I still see this error in 0.17.4

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.

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