Error 255 on Travis build, builds fine locally

I don’t understand why Hugo builds fine locally, but throw an error 255 on Travis, can someone help me figuring it out please?

I have the same Hugo version locally and in .travis.yml.
I should mention that the build time time went from some ms to sometimes 5 seconds with last commit (switching from css to bootstrap scss), which seems weird.

Travis log

This looks to be an issue with gulp, not hugo. From your linked log:

10:19:57] Using gulpfile ~/build/inwardmovement/mettaconseilpro/gulpfile.js
[10:19:57] Starting 'default'...
[10:19:57] Starting 'reset'...
[10:19:57] Finished 'reset' after 6.11 ms
[10:19:57] Starting 'hugo'...
[10:19:57] 'hugo' errored after 370 ms
[10:19:57] Error: exited with error code: 255
    at ChildProcess.onexit (/home/travis/build/inwardmovement/mettaconseilpro/node_modules/end-of-stream/index.js:39:36)
    at ChildProcess.emit (events.js:198:13)
    at ChildProcess.EventEmitter.emit (domain.js:466:23)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
[10:19:57] 'default' errored after 381 ms
e[0Ke[31;1mThe command "gulp" exited with 1.e[0m

I forgot Hugo needs postcss-cli / autoprefixer as global dependencies, Travis couldn’t find them at build time (gulp tasks)… Problem solved.

Thanks, have a great day Zachary.

1 Like