I’ve literally tried so many fixes. NOTHING helped.
“build.command” failed
11:08:18 PM: Build ready to start
11:08:21 PM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal)
11:08:21 PM: build-image tag: v4.10.1
11:08:21 PM: buildbot version: 37262c48b1f3cfa88c6caed707d29b19aef6a5a7
11:08:21 PM: Building without cache
11:08:21 PM: Starting to prepare the repo for build
11:08:21 PM: No cached dependencies found. Cloning fresh repo
11:08:21 PM: git clone GitHub - jayhubb4/ecommerce: Ecommerce sample
11:08:54 PM: Preparing Git Reference refs/heads/main
11:08:56 PM: Parsing package.json dependencies
11:08:57 PM: Starting build script
11:08:57 PM: Installing dependencies
11:08:57 PM: Python version set to 2.7
11:08:57 PM: Downloading and installing node v16.17.0…
11:08:58 PM: Downloading
11:08:58 PM: Computing checksum with sha256sum
11:08:58 PM: Checksums matched!
11:09:03 PM: Now using node v16.17.0 (npm v8.15.0)
11:09:03 PM: Started restoring cached build plugins
11:09:03 PM: Finished restoring cached build plugins
11:09:03 PM: Attempting ruby version 2.7.2, read from environment
11:09:04 PM: Using ruby version 2.7.2
11:09:04 PM: Using PHP version 8.0
11:09:04 PM: No npm workspaces detected
11:09:04 PM: Started restoring cached node modules
11:09:04 PM: Finished restoring cached node modules
11:09:05 PM: Installing NPM modules using NPM version 8.15.0
11:09:05 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
11:09:05 PM: npm WARN config location in the cache, and they are managed by
11:09:05 PM: npm WARN config
11:09:05 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
11:09:05 PM: npm WARN config location in the cache, and they are managed by
11:09:05 PM: npm WARN config cacache
.
11:09:06 PM: added 61 packages, and audited 62 packages in 801ms
11:09:06 PM: 4 packages are looking for funding
11:09:06 PM: run npm fund
for details
11:09:06 PM: found 0 vulnerabilities
11:09:06 PM: NPM modules installed
11:09:06 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
11:09:06 PM: npm WARN config location in the cache, and they are managed by
11:09:06 PM: npm WARN config cacache
.
11:09:06 PM: Started restoring cached go cache
11:09:06 PM: Finished restoring cached go cache
11:09:06 PM: Installing Go version 1.17 (requested 1.17)
11:09:11 PM: unset GOOS;
11:09:11 PM: unset GOARCH;
11:09:11 PM: export GOROOT=‘/opt/buildhome/.gimme/versions/go1.17.linux.amd64’;
11:09:11 PM: export PATH=“/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}”;
11:09:11 PM: go version >&2;
11:09:11 PM: export GIMME_ENV=“/opt/buildhome/.gimme/env/go1.17.linux.amd64.env”
11:09:11 PM: go version go1.17 linux/amd64
11:09:11 PM: Installing missing commands
11:09:11 PM: Verify run directory
11:09:12 PM:
11:09:12 PM: ────────────────────────────────────────────────────────────────
11:09:12 PM: Netlify Build
11:09:12 PM: ────────────────────────────────────────────────────────────────
11:09:12 PM:
11:09:12 PM: ❯ Version
11:09:12 PM: @netlify/build 27.17.1
11:09:12 PM:
11:09:12 PM: ❯ Flags
11:09:12 PM: baseRelDir: true
11:09:12 PM: buildId: 63195ca2456750180583b03f
11:09:12 PM: deployId: 63195ca2456750180583b041
11:09:12 PM:
11:09:12 PM: ❯ Current directory
11:09:12 PM: /opt/build/repo
11:09:12 PM:
11:09:12 PM: ❯ Config file
11:09:12 PM: No config file was defined: using default values.
11:09:12 PM:
11:09:12 PM: ❯ Context
11:09:12 PM: production
11:09:12 PM:
11:09:12 PM: ────────────────────────────────────────────────────────────────
11:09:12 PM: 1. Build command from Netlify app
11:09:12 PM: ────────────────────────────────────────────────────────────────
11:09:12 PM:
11:09:12 PM: $ CI=‘’ npm run build
11:09:13 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
11:09:13 PM: npm WARN config location in the cache, and they are managed by
11:09:13 PM: npm WARN config cacache
.
11:09:13 PM: npm ERR! Missing script: “build”
11:09:13 PM: npm ERR!
11:09:13 PM: npm ERR! To see a list of scripts, run:
11:09:13 PM: npm ERR! npm run
11:09:13 PM: npm ERR! A complete log of this run can be found in:
11:09:13 PM: npm ERR! /opt/buildhome/.npm/_logs/2022-09-08T03_09_13_124Z-debug-0.log
11:09:13 PM:
11:09:13 PM: ────────────────────────────────────────────────────────────────
11:09:13 PM: “build.command” failed
11:09:13 PM: ────────────────────────────────────────────────────────────────
11:09:13 PM:
11:09:13 PM: Error message
11:09:13 PM: Command failed with exit code 1: CI=‘’ npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
11:09:13 PM:
11:09:13 PM: Error location
11:09:13 PM: In Build command from Netlify app:
11:09:13 PM: CI=‘’ npm run build
11:09:13 PM:
11:09:13 PM: Resolved config
11:09:13 PM: build:
11:09:13 PM: command: CI=‘’ npm run build
11:09:13 PM: commandOrigin: ui
11:09:13 PM: environment:
11:09:13 PM: - NEXT_PUBLIC_SANITY_TOKEN
11:09:13 PM: - NEXT_PUBLIC_STRIPE_PUBLISHEABLE_KEY
11:09:13 PM: - NEXT_PUBLIC_STRIPE_SECRET_KEY
11:09:13 PM: publish: /opt/build/repo/ecomm/.next
11:09:13 PM: publishOrigin: ui
11:09:13 PM: Caching artifacts
11:09:13 PM: Started saving node modules
11:09:15 PM: Creating deploy upload records
11:09:13 PM: Finished saving node modules
11:09:13 PM: Started saving build plugins
11:09:13 PM: Finished saving build plugins
11:09:13 PM: Started saving pip cache
11:09:15 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
11:09:13 PM: Finished saving pip cache
11:09:13 PM: Started saving emacs cask dependencies
11:09:13 PM: Finished saving emacs cask dependencies
11:09:13 PM: Started saving maven dependencies
11:09:13 PM: Finished saving maven dependencies
11:09:13 PM: Started saving boot dependencies
11:09:13 PM: Finished saving boot dependencies
11:09:13 PM: Started saving rust rustup cache
11:09:13 PM: Finished saving rust rustup cache
11:09:13 PM: Started saving go dependencies
11:09:13 PM: Finished saving go dependencies
11:09:15 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:09:15 PM: Failing build: Failed to build site
11:09:15 PM: Finished processing build request in 54.489033145s