I am building a website using the hugo sam theme.
I have run into the following error in my build
Transformation failed: POSTCSS: failed to transform “css/main.css” (text/css): PostCSS not found; install with “npm install postcss-cli”. See https://gohugo.io/hugo-pipes/postcss/
I have followed the instructions on that page to install postcss-cli and auto-prefixer, but I am not sure what to push to my repo to get the build on netlify to work. Also, the theme’s README has recently been updated to include instructions on installation of postcss-cli and auto-prefixer but with a global installation.
But my understanding is that if I want the build to be done on netlify, I need to do a local installation and push certain files to the repo. Is that correct?
If I do a local installation using
npm install postcss-cli, I get a package-lock.json file and a node_modules/ folder. Do I need to push all of it, or only the modules related to css?
I am new to all of this and would appreciate any help to understand how it works.