giuliov / hugo-vsts-extension

Generate a site using Hugo, a Fast and Flexible Website Generator, running in Visual Studio Team Services or Team Foundation Server.
MIT License
24 stars 15 forks source link

Possible issue with Extended Version support #9

Closed nsio-admin closed 5 years ago

nsio-admin commented 5 years ago

When running the Hugo generate task using the open source theme 'introduction', Azure Pipelines shows the following error:

error: failed to transform resource: 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/

Hugo Version is set to latest and the Extended checkbox is checked. When running Hugo manually, the above error is typically generated when one forgets to download the extended version of Hugo, but perhaps there is something else I'm doing wrong here?

nsio-admin commented 5 years ago

It turns out that you have to "manually" install both postcss-cli and autoprefixer before running the Hugo task. This is easily done by adding two npm tasks immediately prior to the Hugo task, with custom command lines:

install -g postcss-cli install -g autoprefixer

This results in the Hugo task completing successfully (all other things being equal).

giuliov commented 5 years ago

Music to my hears, sorry for coming back so late but we were busy with "open-heart surgery" at work. Good work and thanks for appreciation.