first off, I’ve seen this thread but didn’t want to continue there as it was marked solved.
We have quite a similar problem with Travis CI and Hugo Pipes as Hugo breaks on the server while working perfect locally:
$ ./hugo/hugo
Building sites … ERROR 2018/11/28 14:00:54 error: failed to transform resource: TOCSS: failed to transform "scss/app.scss" (text/x-scss): this feature is not available in your current Hugo version
Total in 241 ms
Error: Error building site: logged 1 error(s)
The command "./hugo/hugo" exited with 255.
This is our travis.yml
dist: trusty
sudo: false
language: nodejs
nodejs:
- "node"
env:
HUGO=0.50
URL=https://github.com/gohugoio/hugo/releases/download
before_install:
- npm install -g n
- pip install urllib3[secure] awscli --upgrade --user
script:
# don't build hugo all the time. the easy way would have been:
# - go get hugo
# ... but we don't want to build that all the time :)
- mkdir hugo
- cd hugo
- curl -L "${URL}/v${HUGO}/hugo_${HUGO}_Linux-64bit.tar.gz" | gunzip | tar xvf -
- cd ..
- ./hugo/hugo
- '[[ "$TRAVIS_BRANCH" = "master" && "$TRAVIS_PULL_REQUEST" = false ]] && aws s3 sync --delete public/ s3://www.tld.com/ || true'
Note that we want to to use PostCSS with Autoprefixer and therefore enabled node.js – not sure actually if something might be wrong with this …
Unfortunately this did not work. I’m afraid something is wrong with the server configuration …
$ ./hugo/hugo
./hugo/hugo: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./hugo/hugo)
./hugo/hugo: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./hugo/hugo)
thank you very much for your quick and helpful advise. i’m in a company environment and operations has concerns with building hugo from source. we will discuss further and i’ll report back. for the moment just wanted to let you know that we’ve read and appreciated your help!
we got it working by updating our docker container, e. g. updating ubuntu.
fyi here is our travis.yml (note dist:xenial at the very beginning and note the extended version as @zwbetz mentioned ):
dist: xenial
sudo: false
language: node_js
nodejs:
- "node"
env:
HUGO=0.51
URL=https://github.com/gohugoio/hugo/releases/download
before_install:
- npm install -g n
- sudo pip install urllib3[secure] awscli --upgrade --user
script:
# don't build hugo all the time. the easy way would have been:
# - go get hugo
# ... but we don't want to build that all the time :)
- mkdir hugo
- cd hugo
- curl -L "${URL}/v${HUGO}/hugo_extended_${HUGO}_Linux-64bit.tar.gz" | gunzip | tar xvf -
- cd ..
- ./hugo/hugo
- '[[ "$TRAVIS_BRANCH" = "master" && "$TRAVIS_PULL_REQUEST" = false ]] && aws s3 sync --delete public/ s3://www.tld.com/ || true'
@zwbetz Thanks for mentioning that. Actually we would like to use Hugo pipes with PostCSS and Autoprefixer. So I think, node is required – but I’m not sure if it really is …