ERROR hugo serve

Hi,

I had a error when i used the command hugo serve :
Error: Error building site: POSTCSS: failed to transform “style.css” (text/css): resource “scss/example.org/styles/index.scss_02bf14281ac065540fcc7ecc15ca70a4” not found in file cache

My Hugo version :
Hugo Static Site Generator v0.76.5-60F0725B windows/amd64 BuildDate: 2020-10-14T15:16:53Z

After some research, I have see this topic for my problem :

So, i installed the version “extended”

My new Hugo version :
Hugo Static Site Generator v0.76.5/extended windows/amd64 BuildDate: unknown

But i have always my problem.

Thanks for you help…

Is the error message now identical to the one before? Try deleting the resources folder and re-run.

Yes, the error message is identical even after deleting the resources folder.

See https://gohugo.io/hugo-pipes/postcss.

Hugo Pipe’s PostCSS requires the postcss-cli JavaScript package to be installed in the environment ( npm install -g postcss postcss-cli ) along with any PostCSS plugin(s) used (e.g., npm install -g autoprefixer ).

If you are using the Hugo Snap package, PostCSS and plugin(s) need to be installed locally within your Hugo site directory, e.g., npm install postcss-cli without the -g flag

Thanks but that does not solve the problem.

Please post a link to the public repository for your project.

I haven’t got public repository for the moment, i work only locally.

I have only installed Hugo and add syna theme yesterday for my first time…

summary of the procedure :
hugo new site my-site
cd my-site
git init
git submodule add https://github.com/okkur/syna.git themes/syna
echo ‘theme = “syna”’ >> config.toml
+
git submodule add https://github.com/postcss/postcss-cli

My tree :
\Hugo\bin
\Hugo\Sites
\Hugo\Sites\my-site\archetypes
\Hugo\Sites\my-site\content
\Hugo\Sites\my-site\data
\Hugo\Sites\my-site\layouts
\Hugo\Sites\my-site\postcss-cli
\Hugo\Sites\my-site\ressources
\Hugo\Sites\my-site\static
\Hugo\Sites\my-site\themes\syna
\Hugo\Sites\my-site\config.toml

With config.toml :
baseurl = “http:/example.org/”
languageCode = “en-us”
title = “My site”
theme = “syna”

For information, I work on windows 7.

hugo new site my-site
cd my-site
git init
git submodule add https://github.com/okkur/syna.git themes/syna
echo 'theme = "syna"' >> config.toml
npm install -D postcss postcss-cli
hugo

See https://github.com/okkur/syna/issues/830

1 Like