okkur / syna-start

Clonable starter repository for a Syna theme based website
Apache License 2.0
27 stars 59 forks source link

POSTCSS: failed to transform "style.css" #40

Closed NicoHood closed 4 years ago

NicoHood commented 4 years ago

Is this a BUG REPORT or FEATURE REQUEST?: bug

What happened: I am unable to run the syna theme. I get the error:

$ hugo server -D
Building sites … WARN 2020/08/09 15:02:49 .File.Dir on zero object. Wrap it in if or with: {{ with .File }}{{ .Dir }}{{ end }}
Built in 289 ms
Error: Error building site: POSTCSS: failed to transform "style.css" (text/css): resource "scss/styles/index.scss_02bf14281ac065540fcc7ecc15ca70a4" not found in file cache

How would I fix this?

Environment:

mpourismaiel commented 4 years ago

We have a PR working on this issue but our tests are failing for some reason and we can't figure out what's wrong. You can check it out here: https://github.com/okkur/syna/pull/816

You can install postcss-cli by running npm i -g postcss-cli (requires node-js to be installed). This will fix the issue and you wouldn't need to wait for the PR to be merged. We're still working on a solution to remove the need for PostCSS to be installed on user workspaces.

giallu commented 4 years ago

Could it be the same as this? https://discourse.gohugo.io/t/problem-chaining-tocss-and-postcss/24260/2

stp-ip commented 4 years ago

This is a different bug. Postcss requires postcss-cli to be installed. We have an inflight PR, which still has failing tests, we have to dive into. For now either using Hugo's non extended version or installing postcss-cli should work.

stp-ip commented 4 years ago

This should be fixed with v0.17.4