Build command failed with exit code 1 error

I’m getting errors while trying to deploy my app
Netlify site name - (Netlify App)
This is the build log below

2:34:32 AM: build-image version: d55944c047ef0aee2ac01971edde72cb2a50acfe (focal)
2:34:32 AM: build-image tag: v4.16.1
2:34:32 AM: buildbot version: 33f88475bcf3426608b49b7681d295235efb41f1
2:34:32 AM: Fetching cached dependencies
2:34:32 AM: Failed to fetch cache, continuing with build
2:34:32 AM: Starting to prepare the repo for build
2:34:32 AM: No cached dependencies found. Cloning fresh repo
2:34:32 AM: git clone GitHub - Deckason/React-Quiz-App
2:34:33 AM: Preparing Git Reference refs/heads/main
2:34:33 AM: Parsing package.json dependencies
2:34:34 AM: Starting build script
2:34:34 AM: Installing dependencies
2:34:34 AM: Python version set to 2.7
2:34:34 AM: v16.19.0 is already installed.
2:34:35 AM: Now using node v16.19.0 (npm v8.19.3)
2:34:35 AM: Enabling node corepack
2:34:35 AM: Started restoring cached build plugins
2:34:35 AM: Finished restoring cached build plugins
2:34:35 AM: Attempting ruby version 2.7.2, read from environment
2:34:36 AM: Using ruby version 2.7.2
2:34:36 AM: Using PHP version 8.0
2:34:36 AM: No npm workspaces detected
2:34:36 AM: Started restoring cached node modules
2:34:36 AM: Finished restoring cached node modules
2:34:36 AM: Installing NPM modules using NPM version 8.19.3
2:34:40 AM: npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: Array.prototype.sort() - JavaScript | MDN
2:34:43 AM: npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
2:34:49 AM: added 1556 packages, and audited 1557 packages in 13s
2:34:49 AM: 212 packages are looking for funding
2:34:49 AM: run npm fund for details
2:34:49 AM: 9 vulnerabilities (8 high, 1 critical)
2:34:49 AM: To address issues that do not require attention, run:
2:34:49 AM: npm audit fix
2:34:49 AM: To address all issues (including breaking changes), run:
2:34:49 AM: npm audit fix --force
2:34:49 AM: Run npm audit for details.
2:34:49 AM: NPM modules installed
2:34:49 AM: Creating package sha
2:34:49 AM: Started restoring cached go cache
2:34:49 AM: Finished restoring cached go cache
2:34:50 AM: go version go1.19.4 linux/amd64
2:34:51 AM: Detected 1 framework(s)
2:34:51 AM: “create-react-app” at version “5.0.1”
2:34:51 AM: Installing missing commands
2:34:51 AM: Verify run directory
2:34:51 AM: Section completed: initializing
2:34:52 AM: ​
2:34:52 AM: Netlify Build
2:34:52 AM: ────────────────────────────────────────────────────────────────
2:34:52 AM: ​
2:34:52 AM: ❯ Version
2:34:52 AM: @netlify/build 29.2.1
2:34:52 AM: ​
2:34:52 AM: ❯ Flags
2:34:52 AM: baseRelDir: true
2:34:52 AM: buildId: 63aa4ba62e792109482a3bc3
2:34:52 AM: deployId: 63aa4ba62e792109482a3bc5
2:34:52 AM: ​
2:34:52 AM: ❯ Current directory
2:34:52 AM: /opt/build/repo
2:34:52 AM: ​
2:34:52 AM: ❯ Config file
2:34:52 AM: No config file was defined: using default values.
2:34:52 AM: ​
2:34:52 AM: ❯ Context
2:34:52 AM: production
2:34:52 AM: ​
2:34:52 AM: 1. Build command from Netlify app
2:34:52 AM: ────────────────────────────────────────────────────────────────
2:34:52 AM: ​
2:34:52 AM: $ npm run build
2:34:52 AM: > React Quiz App@0.1.0 build
2:34:52 AM: > react-scripts build
2:34:53 AM: Creating an optimized production build…
2:35:11 AM:
2:35:11 AM: Treating warnings as errors because process.env.CI = true.
2:35:11 AM: Most CI servers set it automatically.
2:35:11 AM:
2:35:11 AM: Failed to compile.
2:35:11 AM:
2:35:11 AM: [eslint]
2:35:11 AM: src/Components/Quiz.js
2:35:11 AM: Line 65:17: Unreachable code no-unreachable
2:35:11 AM: Line 77:33: Block is redundant no-lone-blocks
2:35:11 AM: Line 80:17: Unreachable code no-unreachable
2:35:11 AM: Line 84:17: Unreachable code no-unreachable
2:35:11 AM: Line 92:7: React Hook useEffect has a missing dependency: ‘getDocuments’. Either include it or remove the dependency array react-hooks/exhaustive-deps
2:35:11 AM: Line 92:8: React Hook useEffect has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked react-hooks/exhaustive-deps
2:35:11 AM: ​
2:35:11 AM: “build.command” failed
2:35:11 AM: ────────────────────────────────────────────────────────────────
2:35:11 AM: ​
2:35:11 AM: Error message
2:35:11 AM: Command failed with exit code 1: npm run build
2:35:11 AM: ​
2:35:11 AM: Error location
2:35:11 AM: In Build command from Netlify app:
2:35:11 AM: npm run build
2:35:11 AM: ​
2:35:11 AM: Resolved config
2:35:11 AM: build:
2:35:11 AM: command: npm run build
2:35:12 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
2:35:11 AM: commandOrigin: ui
2:35:11 AM: publish: /opt/build/repo/build
2:35:11 AM: publishOrigin: ui
2:35:11 AM: Caching artifacts
2:35:11 AM: Started saving node modules
2:35:11 AM: Finished saving node modules
2:35:11 AM: Started saving build plugins
2:35:11 AM: Finished saving build plugins
2:35:11 AM: Started saving pip cache
2:35:11 AM: Finished saving pip cache
2:35:11 AM: Started saving emacs cask dependencies
2:35:11 AM: Finished saving emacs cask dependencies
2:35:11 AM: Started saving maven dependencies
2:35:11 AM: Finished saving maven dependencies
2:35:11 AM: Started saving boot dependencies
2:35:11 AM: Finished saving boot dependencies
2:35:11 AM: Started saving rust rustup cache
2:35:11 AM: Finished saving rust rustup cache
2:35:11 AM: Started saving go dependencies
2:35:11 AM: Finished saving go dependencies
2:35:12 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:35:12 AM: Failing build: Failed to build site
2:35:12 AM: Finished processing build request in 39.822661932s

I think screenshots would help too

Hi @Deckason :wave:t6: Thanks so much for reaching out and welcome to the Netlify Forums. First, have you looked through this resource 7? It is a compilation of all of our build and deploy resources. This is a good starting point.

If those resources don’t get you on the right track, can you share a bit more information about what you are trying to accomplish?

Lastly, please share these additional details so we can look into your experience further:

Thanks so much!