Cannot deploy my site in Netlify with `non-zero exit code: 127`

Hi @mara, I read your answer
But I think the error I face is a little different from the error with non-zero exit code: 255.
I have already follow your suggestion and set the hugo version.
Here is the error.

Error running command: Build script returned non-zero exit code: 127
Here is my deploy log.
11:43:37 AM: Build ready to start
11:43:39 AM: build-image version: 12783d4d177a66bec5a23ad1097ea7bd02931128
11:43:39 AM: buildbot version: 5a64b5cb0ce1ed3ba485935522483a4d39e15107
11:43:39 AM: Fetching cached dependencies
11:43:39 AM: Failed to fetch cache, continuing with build
11:43:39 AM: Starting to prepare the repo for build
11:43:40 AM: No cached dependencies found. Cloning fresh repo
11:43:40 AM: git clone https://github.com/JiaxiangBU/blog_180802
11:43:47 AM: Preparing Git Reference refs/heads/master
11:43:48 AM: Starting build script
11:43:48 AM: Installing dependencies
11:43:49 AM: Downloading and installing node v8.13.0...
11:43:49 AM: Downloading https://nodejs.org/dist/v8.13.0/node-v8.13.0-linux-x64.tar.xz...
11:43:49 AM: 
#
11:43:49 AM:                          1.6%
11:43:49 AM: 
################
11:43:49 AM: ##############                                            42.0%
11:43:49 AM: 
#############################################
11:43:49 AM: ########################### 100.0%
11:43:49 AM: Computing checksum with sha256sum
11:43:49 AM: Checksums matched!
11:43:52 AM: Now using node v8.13.0 (npm v6.4.1)
11:43:52 AM: Attempting ruby version 2.3.6, read from environment
11:43:53 AM: Using ruby version 2.3.6
11:43:53 AM: Using PHP version 5.6
11:43:53 AM: Installing Hugo 0.46
11:43:54 AM: Started restoring cached go cache
11:43:54 AM: Finished restoring cached go cache
11:43:54 AM: unset GOOS;
11:43:54 AM: unset GOARCH;
11:43:54 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.10.linux.amd64';
11:43:54 AM: export PATH="/opt/buildhome/.gimme/versions/go1.10.linux.amd64/bin:${PATH}";
11:43:54 AM: go version >&2;
11:43:54 AM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.10.linux.amd64.env';
11:43:54 AM: go version go1.10 linux/amd64
11:43:54 AM: Installing missing commands
11:43:54 AM: Verify run directory
11:43:54 AM: Executing user command: hugo_0.46
11:43:54 AM: /usr/local/bin/build: line 32: hugo_0.46: command not found
11:43:54 AM: Caching artifacts
11:43:54 AM: Started saving pip cache
11:43:54 AM: Finished saving pip cache
11:43:54 AM: Started saving emacs cask dependencies
11:43:54 AM: Finished saving emacs cask dependencies
11:43:54 AM: Started saving maven dependencies
11:43:54 AM: Finished saving maven dependencies
11:43:54 AM: Started saving boot dependencies
11:43:54 AM: Finished saving boot dependencies
11:43:54 AM: Started saving go dependencies
11:43:55 AM: Finished saving go dependencies
11:43:55 AM: Cached node version v8.13.0
11:43:55 AM: Error running command: Build script returned non-zero exit code: 127
11:43:55 AM: Failing build: Failed to build site
11:43:55 AM: failed during stage 'building site': Build script returned non-zero exit code: 127
11:43:55 AM: Finished processing build request in 15.860973384s

A 127 exit code typically means a command has not been found.

If you look through the log you pasted, you can see:

11:43:54 AM: Executing user command: hugo_0.46
11:43:54 AM: /usr/local/bin/build: line 32: hugo_0.46: command not found

Since I don't know your setup, I can't say for sure, but I would venture a guess that you have hugo_0.46 set as your build command, when the build command should be hugo and the version set in the Build environmental variables section (per the post to which you linked).

I describe this in more detail in the post here:

1 Like

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