Error building site: POSTCSS

Hi. Hello. I’m trying to deploy my site on Hugo with Github, I keep getting an error.

|22:07:11.358|Error: Error building site: POSTCSS: failed to transform scss/global.css (text/css). Check your PostCSS installation; install with npm install postcss-cli. See this feature is not available in your current Hugo version, see for more information|
|22:07:11.359|Total in 1343 ms|
|22:07:11.370|Failed: build command exited with code: 255|
|22:07:12.211|Failed: an internal error occurred|

Everything works as it should on my local computer. PostCSS is installed according to all instructions. The Hugo and Go versions are registered in variable environments in the Cloudflare settings, but still this error does not disappear. What to do?

Is this with Cloudflare Pages?

Do you have a NODE_VERSION env var set to something more modern such as 16? It uses 12 by default which is very outdated. Can you try setting that, if you haven’t already?

1 Like

In general, Hugo does not use node.js … only PostCSS uses it

Can you try setting that var and seeing if it helps? If not, can you please provide a minimal reproduction for the issue?

  • Unfortunately, it didn’t help. I also removed it from the file .gitignore node_modules, so that the folder is also together with the package file.json was deployed to Cloudflare, but the error remained the same

This my variables

This my postcss.confrg.js

module.exports = {
	plugins: {
		autoprefixer: {
			browsers: [
				"last 2 versions",
				"Explorer >= 8",

this my config.toml

baseURL = ""
languageCode = "en-us"
title = "Cazumbra"
paginate = "1"
theme = "theme"
disableHugoGeneratorInject = false

# See
# The value of pre is the icon name
		name = "Home"
		pre = "home"
		url = "/"
		weight = 1
		name = "Blog"
		pre = "edit"
		url = "/blog/"
		weight = 2
		name = "Проекты"
		url = "/projects/"
		weight = 3
		name = "Tags"
		pre = "tag"
		url = "/tags/"
		weight = 4
		name = "Category"
		pre = "tag"
		url = "/categories/"
		weight = 5

    dateFormat = "2 Jan 2006"
    homeText = "You just made a Hugo blog from scratch."
	Description = "The personal website, blog and dev diary of clairecodes"

Do you have a minimal reproduction repository for this issue?

There’s a new project there, so I opened the main repository, I can’t insert a link here, so you can search on github for the keyword “schtml” you will find on the first page “leokolt/schtml”

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.