i'm deploying a prototype to netlify cms to experiment with the blog/markdown functionality that netlify cms offers. however, my build has failed (despite gatsby build
working locally). i've seen that exit code 127
is quite a common error, but i've cleared both my gatsby/netlify cache, tried switching to npm run build
to get a more comprehensive list of errors (didn't work, just kept printing > blog@1.0.0 build > npm run build
in my terminal). i'm not sure if this might be due to dependency issues as there were plugins that i had to install with --legacy-peer-deps
.
Here's my deploy log and a link to my repo: https://github.com/claudiahleung/gatsby-learnings. Would appreciate any help!
12:02:11 PM: Build ready to start
12:08:45 PM: build-image version: 7b53c5fc4445e3ec99d3949e5d1174a8c5be4f16
12:08:45 PM: build-image tag: v3.7.2
12:08:45 PM: buildbot version: a8df6d1263bb5bcc16f7b4ebb8e9a6cb904cfa8a
12:08:45 PM: Fetching cached dependencies
12:08:45 PM: Failed to fetch cache, continuing with build
12:08:45 PM: Starting to prepare the repo for build
12:08:46 PM: No cached dependencies found. Cloning fresh repo
12:08:46 PM: git clone https://github.com/claudiahleung/gatsby-learnings
12:09:02 PM: Preparing Git Reference refs/heads/main
12:09:04 PM: Parsing package.json dependencies
12:09:05 PM: Starting build script
12:09:05 PM: Installing dependencies
12:09:05 PM: Python version set to 2.7
12:09:06 PM: v12.18.0 is already installed.
12:09:07 PM: Now using node v12.18.0 (npm v6.14.4)
12:09:07 PM: Started restoring cached build plugins
12:09:07 PM: Finished restoring cached build plugins
12:09:07 PM: Attempting ruby version 2.7.1, read from environment
12:09:08 PM: Using ruby version 2.7.1
12:09:08 PM: Using PHP version 5.6
12:09:08 PM: Started restoring cached go cache
12:09:08 PM: Finished restoring cached go cache
12:09:09 PM: go version go1.14.4 linux/amd64
12:09:09 PM: go version go1.14.4 linux/amd64
12:09:09 PM: Installing missing commands
12:09:09 PM: Verify run directory
12:09:10 PM:
12:09:10 PM: ────────────────────────────────────────────────────────────────
12:09:10 PM: Netlify Build
12:09:10 PM: ────────────────────────────────────────────────────────────────
12:09:10 PM:
12:09:10 PM: ❯ Version
12:09:10 PM: @netlify/build 11.3.2
12:09:10 PM:
12:09:10 PM: ❯ Flags
12:09:10 PM: deployId: 608a2fc31e2066000802ecfa
12:09:10 PM:
12:09:10 PM: ❯ Current directory
12:09:10 PM: /opt/build/repo
12:09:10 PM:
12:09:10 PM: ❯ Config file
12:09:10 PM: No config file was defined: using default values.
12:09:10 PM:
12:09:10 PM: ❯ Context
12:09:10 PM: production
12:09:10 PM:
12:09:10 PM: ────────────────────────────────────────────────────────────────
12:09:10 PM: 1. Build command from Netlify app
12:09:10 PM: ────────────────────────────────────────────────────────────────
12:09:10 PM:
12:09:10 PM: $ gatsby build
12:09:10 PM: bash: gatsby: command not found
12:09:10 PM:
12:09:10 PM: ────────────────────────────────────────────────────────────────
12:09:10 PM: "build.command" failed
12:09:10 PM: ────────────────────────────────────────────────────────────────
12:09:10 PM:
12:09:10 PM: Error message
12:09:10 PM: Command failed with exit code 127: gatsby build
12:09:10 PM:
12:09:10 PM: Error location
12:09:10 PM: In Build command from Netlify app:
12:09:10 PM: gatsby build
12:09:10 PM:
12:09:10 PM: Resolved config
12:09:10 PM: build:
12:09:10 PM: command: gatsby build
12:09:10 PM: commandOrigin: ui
12:09:10 PM: publish: /opt/build/repo/public
12:09:11 PM: Caching artifacts
12:09:11 PM: Started saving build plugins
12:09:11 PM: Finished saving build plugins
12:09:11 PM: Started saving pip cache
12:09:11 PM: Finished saving pip cache
12:09:11 PM: Started saving emacs cask dependencies
12:09:11 PM: Finished saving emacs cask dependencies
12:09:11 PM: Started saving maven dependencies
12:09:11 PM: Finished saving maven dependencies
12:09:11 PM: Started saving boot dependencies
12:09:11 PM: Finished saving boot dependencies
12:09:11 PM: Started saving rust rustup cache
12:09:11 PM: Finished saving rust rustup cache
12:09:11 PM: Started saving go dependencies
12:09:11 PM: Finished saving go dependencies
12:09:13 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
12:09:13 PM: Creating deploy upload records
12:09:13 PM: Failing build: Failed to build site
12:09:13 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
12:09:13 PM: Finished processing build request in 28.232494224s