Error running command: Build script returned non-zero exit code: 126

I was attempting to deploy my website on netlify, running with node.js. However, while attempting to deploy, I am returned with the error, “Error running command: Build script returned non-zero exit code: 126”

The source code for the software I am deploying can be found here: https://github.com/TannerReynolds/ShareS

The following is my deploy log:

10:11:58 AM: Build ready to start
10:12:02 AM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
10:12:02 AM: build-image tag: v3.3.2
10:12:02 AM: buildbot version: ef8d0929ed0baabafd8bbb7d0b021e1fc24180c0
10:12:02 AM: Fetching cached dependencies
10:12:03 AM: Starting to download cache of 255.0KB
10:12:03 AM: Finished downloading cache in 74.619399ms
10:12:03 AM: Starting to extract cache
10:12:03 AM: Failed to fetch cache, continuing with build
10:12:03 AM: Starting to prepare the repo for build
10:12:03 AM: No cached dependencies found. Cloning fresh repo
10:12:03 AM: git clone https://github.com/asaltypretzel/ShareS
10:12:04 AM: Preparing Git Reference refs/heads/master
10:12:05 AM: Starting build script
10:12:05 AM: Installing dependencies
10:12:06 AM: Downloading and installing node v10.16.0...
10:12:06 AM: Downloading https://nodejs.org/dist/v10.16.0/node-v10.16.0-linux-x64.tar.xz...
10:12:07 AM: #
10:12:07 AM: #
10:12:07 AM:                                                      4.1%
10:12:07 AM: 
################################################
10:12:07 AM:            67.6%
10:12:07 AM: 
#########################################
10:12:07 AM: ############################### 100.0%
10:12:07 AM: Computing checksum with sha256sum
10:12:07 AM: Checksums matched!
10:12:10 AM: Now using node v10.16.0 (npm v6.9.0)
10:12:11 AM: Attempting ruby version 2.6.2, read from environment
10:12:12 AM: Using ruby version 2.6.2
10:12:13 AM: Using PHP version 5.6
10:12:13 AM: Started restoring cached go cache
10:12:13 AM: Finished restoring cached go cache
10:12:13 AM: unset GOOS;
10:12:13 AM: unset GOARCH;
10:12:13 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
10:12:13 AM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
10:12:13 AM: go version >&2;
10:12:13 AM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
10:12:13 AM: go version go1.12 linux/amd64
10:12:13 AM: Installing missing commands
10:12:13 AM: Verify run directory
10:12:13 AM: Executing user command: ./install.sh
10:12:13 AM: /usr/local/bin/build: line 34: ./install.sh: Permission denied
10:12:13 AM: Skipping functions preparation step: no functions directory set
10:12:13 AM: Caching artifacts
10:12:13 AM: Started saving pip cache
10:12:13 AM: Finished saving pip cache
10:12:13 AM: Started saving emacs cask dependencies
10:12:13 AM: Finished saving emacs cask dependencies
10:12:13 AM: Started saving maven dependencies
10:12:13 AM: Finished saving maven dependencies
10:12:13 AM: Started saving boot dependencies
10:12:13 AM: Finished saving boot dependencies
10:12:13 AM: Started saving go dependencies
10:12:13 AM: Finished saving go dependencies
10:12:16 AM: Error running command: Build script returned non-zero exit code: 126
10:12:16 AM: Failing build: Failed to build site
10:12:16 AM: failed during stage 'building site': Build script returned non-zero exit code: 126
10:12:16 AM: Finished processing build request in 13.88677925s

I have tried to debug this in a few ways, however, I am given the same error.

Looks like you’re trying to run a server, Netlify is only capable of running build commands. It’s meant for Static Site Generators and other build tools.

1 Like