Build Failure on Deploy

This is my site: Page Not Found (646511378b25f31e3a1040ed–borderbuddies5k.netlify.app)

and I am getting the below error when I build:
2:23:32 PM: build-image version: a8447da70f77f92b7813b5e93ee9b81ed7ae5f55 (focal)
2:23:32 PM: buildbot version: a8447da70f77f92b7813b5e93ee9b81ed7ae5f55
2:23:32 PM: Building without cache
2:23:32 PM: Starting to prepare the repo for build
2:23:33 PM: No cached dependencies found. Cloning fresh repo
2:23:33 PM: git clone --filter=blob:none https://github.com/ach0319/run
2:23:33 PM: Preparing Git Reference refs/heads/master
2:23:35 PM: Parsing package.json dependencies
2:23:36 PM: Starting to install dependencies
2:23:36 PM: Python version set to 3.8
2:23:37 PM: Attempting Ruby version 2.7.2, read from environment
2:23:37 PM: Using Ruby version 2.7.2
2:23:38 PM: Started restoring cached go cache
2:23:38 PM: Finished restoring cached go cache
2:23:38 PM: go version go1.19.9 linux/amd64
2:23:38 PM: Using PHP version 8.0
2:23:39 PM: v16.20.0 is already installed.
2:23:40 PM: Now using node v16.20.0 (npm v8.19.4)
2:23:40 PM: Enabling Node.js Corepack
2:23:40 PM: Started restoring cached build plugins
2:23:40 PM: Finished restoring cached build plugins
2:23:40 PM: Started restoring cached corepack dependencies
2:23:40 PM: Finished restoring cached corepack dependencies
2:23:40 PM: jq: error (at :75): Cannot iterate over null (null)
2:23:40 PM: No npm workspaces detected
2:23:40 PM: Started restoring cached node modules
2:23:40 PM: Finished restoring cached node modules
2:23:40 PM: Installing npm packages using npm version 8.19.4
2:24:00 PM: added 1423 packages, and audited 1424 packages in 20s
2:24:00 PM: 194 packages are looking for funding
2:24:00 PM: run npm fund for details
2:24:00 PM: 14 vulnerabilities (13 high, 1 critical)
2:24:00 PM: To address issues that do not require attention, run:
2:24:00 PM: npm audit fix
2:24:00 PM: To address all issues (including breaking changes), run:
2:24:00 PM: npm audit fix --force
2:24:00 PM: Run npm audit for details.
2:24:00 PM: npm packages installed
2:24:00 PM: Install dependencies script success
2:24:00 PM: Starting build script
2:24:01 PM: Detected 1 framework(s)
2:24:01 PM: β€œcreate-react-app” at version β€œ5.0.1”
2:24:01 PM: Section completed: initializing
2:24:03 PM: ​
2:24:03 PM: Netlify Build
2:24:03 PM: ────────────────────────────────────────────────────────────────
2:24:03 PM: ​
2:24:03 PM: ❯ Version
2:24:03 PM: @netlify/build 29.11.5
2:24:03 PM: ​
2:24:03 PM: ❯ Flags
2:24:03 PM: baseRelDir: true
2:24:03 PM: buildId: 64651ba061416a281f01c581
2:24:03 PM: deployId: 64651ba061416a281f01c583
2:24:03 PM: ​
2:24:03 PM: ❯ Current directory
2:24:03 PM: /opt/build/repo
2:24:03 PM: ​
2:24:03 PM: ❯ Config file
2:24:03 PM: No config file was defined: using default values.
2:24:03 PM: ​
2:24:03 PM: ❯ Context
2:24:03 PM: production
2:24:03 PM: ​
2:24:03 PM: Build command from Netlify app
2:24:03 PM: ────────────────────────────────────────────────────────────────
2:24:03 PM: ​
2:24:03 PM: $ CI = npm run build
2:24:03 PM: bash: CI: command not found
2:24:03 PM: ​
2:24:03 PM: β€œbuild.command” failed
2:24:03 PM: ────────────────────────────────────────────────────────────────
2:24:03 PM: ​
2:24:03 PM: Error message
2:24:03 PM: Command failed with exit code 127: CI = npm run build (Search results for '"non-zero exit code: 127"' - Netlify Support Forums)
2:24:03 PM: ​
2:24:03 PM: Error location
2:24:03 PM: In Build command from Netlify app:
2:24:03 PM: CI = npm run build
2:24:03 PM: ​
2:24:04 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)
2:24:03 PM: Resolved config
2:24:03 PM: build:
2:24:03 PM: command: CI = npm run build
2:24:03 PM: commandOrigin: ui
2:24:03 PM: environment:
2:24:03 PM: - CI
2:24:03 PM: publish: /opt/build/repo/build
2:24:03 PM: publishOrigin: ui
2:24:04 PM: Caching artifacts
2:24:04 PM: Started saving node modules
2:24:04 PM: Finished saving node modules
2:24:04 PM: Started saving build plugins
2:24:04 PM: Finished saving build plugins
2:24:04 PM: Started saving corepack cache
2:24:04 PM: Finished saving corepack cache
2:24:04 PM: Started saving pip cache
2:24:04 PM: Finished saving pip cache
2:24:04 PM: Started saving emacs cask dependencies
2:24:04 PM: Finished saving emacs cask dependencies
2:24:04 PM: Started saving maven dependencies
2:24:04 PM: Finished saving maven dependencies
2:24:04 PM: Started saving boot dependencies
2:24:04 PM: Finished saving boot dependencies
2:24:04 PM: Started saving rust rustup cache
2:24:04 PM: Finished saving rust rustup cache
2:24:04 PM: Started saving go dependencies
2:24:04 PM: Finished saving go dependencies
2:24:04 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:24:04 PM: Failing build: Failed to build site
2:24:05 PM: Finished processing build request in 32.622s

Any ideas on how to fix this?

Change the build command to CI= npm run build (no space between CI and =) @ach0319

1 Like