We couldn’t deploy your site. Check out our Build docs for tips on troubleshooting your build, and if that doesn’t help, please review our Support Guide on extended debugging before asking us for debugging advice

Continuing the discussion from Exit code 255 & non-zero exit code: 2:

Can anyone help with the error below : 2:50:53 AM: build-image version: 340a5296c836ef3d99ac1d871c6447bb7a417c33 (focal)
2:50:53 AM: buildbot version: 20d735efc756356fd09bbc43982bef2018461b10
2:50:53 AM: Fetching cached dependencies
2:50:53 AM: Failed to fetch cache, continuing with build
2:50:53 AM: Starting to prepare the repo for build
2:50:53 AM: No cached dependencies found. Cloning fresh repo
2:50:53 AM: git clone --filter=blob:none https://github.com/shivamgupta6588/rwn-clothing
2:50:54 AM: Preparing Git Reference refs/heads/deva
2:50:54 AM: Parsing package.json dependencies
2:50:56 AM: Starting to install dependencies
2:50:56 AM: Python version set to 3.8
2:50:56 AM: Attempting Ruby version 2.7.2, read from environment
2:50:56 AM: Using Ruby version 2.7.2
2:50:57 AM: Started restoring cached go cache
2:50:57 AM: Finished restoring cached go cache
2:50:57 AM: Installing Go version 1.19.5 (requested 1.19.5)
2:51:02 AM: go version go1.19.5 linux/amd64
2:51:02 AM: Using PHP version 8.0
2:51:03 AM: v16.20.0 is already installed.
2:51:03 AM: Now using node v16.20.0 (npm v8.19.4)
2:51:03 AM: Enabling Node.js Corepack
2:51:03 AM: Started restoring cached build plugins
2:51:03 AM: Finished restoring cached build plugins
2:51:03 AM: Started restoring cached corepack dependencies
2:51:03 AM: Finished restoring cached corepack dependencies
2:51:03 AM: jq: error (at :75): Cannot iterate over null (null)
2:51:03 AM: No npm workspaces detected
2:51:03 AM: Started restoring cached node modules
2:51:03 AM: Finished restoring cached node modules
2:51:03 AM: Installing npm packages using npm version 8.19.4
2:51:08 AM: npm WARN deprecated w3c-hr-time@1.0.2: Use your platform’s native performance.now() and performance.timeOrigin.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:51:08 AM: npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
2:51:08 AM: npm WARN deprecated rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
2:51:09 AM: npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
2:51:16 AM: added 1581 packages, and audited 1582 packages in 13s
2:51:16 AM: 235 packages are looking for funding
2:51:16 AM: run npm fund for details
2:51:16 AM: 6 high severity vulnerabilities
2:51:16 AM: To address all issues (including breaking changes), run:
2:51:16 AM: npm audit fix --force
2:51:16 AM: Run npm audit for details.
2:51:16 AM: npm packages installed
2:51:16 AM: Install dependencies script success
2:51:16 AM: Starting build script
2:51:17 AM: Detected 1 framework(s)
2:51:17 AM: “create-react-app” at version “5.0.1”
2:51:17 AM: Section completed: initializing
2:51:19 AM: ​
2:51:19 AM: Netlify Build
2:51:19 AM: ────────────────────────────────────────────────────────────────
2:51:19 AM: ​
2:51:19 AM: ❯ Version
2:51:19 AM: @netlify/build 29.11.2
2:51:19 AM: ​
2:51:19 AM: ❯ Flags
2:51:19 AM: baseRelDir: true
2:51:19 AM: buildId: 645eadb123d90c4315c70d29
2:51:19 AM: deployId: 645eadb123d90c4315c70d2b
2:51:19 AM: ​
2:51:19 AM: ❯ Current directory
2:51:19 AM: /opt/build/repo
2:51:19 AM: ​
2:51:19 AM: ❯ Config file
2:51:19 AM: No config file was defined: using default values.
2:51:19 AM: ​
2:51:19 AM: ❯ Context
2:51:19 AM: production
2:51:19 AM: ​
2:51:19 AM: Build command from Netlify app
2:51:19 AM: ────────────────────────────────────────────────────────────────
2:51:19 AM: ​
2:51:19 AM: $ npm run build
2:51:19 AM: > rwn-clothing@0.1.0 build
2:51:19 AM: > react-scripts build
2:51:20 AM: Creating an optimized production build…
2:51:37 AM:
2:51:37 AM: Treating warnings as errors because process.env.CI = true.
2:51:37 AM: Most CI servers set it automatically.
2:51:37 AM:
2:51:37 AM: Failed to compile.
2:51:37 AM:
2:51:37 AM: [eslint]
2:51:37 AM: src/App.js
2:51:37 AM: Line 2:23: ‘Outlet’ is defined but never used no-unused-vars
2:51:37 AM: src/components/navigation/navigation.component.jsx
2:51:37 AM: Line 2:10: ‘Link’ is defined but never used no-unused-vars
2:51:37 AM: src/components/sign-inform/sign-inform.component.jsx
2:51:37 AM: Line 4:3: ‘createUserDocumentFromAuth’ is defined but never used no-unused-vars
2:51:37 AM: Line 29:14: ‘user’ is assigned a value but never used no-unused-vars
2:51:37 AM: src/components/sign-upform/sign-upform.component.jsx
2:51:37 AM: Line 32:18: Expected ‘!==’ and instead saw ‘!=’ eqeqeq
2:51:37 AM: Line 43:22: Expected ‘===’ and instead saw ‘==’ eqeqeq
2:51:37 AM: src/context/user.context.jsx
2:51:37 AM: Line 17:14: ‘unsubscribe’ is assigned a value but never used no-unused-vars
2:51:37 AM: src/routes/authentication/authentication.component.jsx
2:51:37 AM: Line 10:9: ‘logGoogleUser’ is assigned a value but never used no-unused-vars
2:51:37 AM: Line 12:11: ‘userDocRef’ is assigned a value but never used no-unused-vars
2:51:37 AM: src/utils/firebase/firebase.util.js
2:51:37 AM: Line 39:7: ‘app’ is assigned a value but never used no-unused-vars
2:51:37 AM: ​
2:51:37 AM: “build.command” failed
2:51:37 AM: ────────────────────────────────────────────────────────────────
2:51:37 AM: ​
2:51:37 AM: Error message
2:51:37 AM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
2:51:37 AM: ​
2:51:39 AM: 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:51:37 AM: Error location
2:51:37 AM: In Build command from Netlify app:
2:51:37 AM: npm run build
2:51:37 AM: ​
2:51:37 AM: Resolved config
2:51:37 AM: build:
2:51:37 AM: command: npm run build
2:51:37 AM: commandOrigin: ui
2:51:37 AM: publish: /opt/build/repo/build
2:51:37 AM: publishOrigin: ui
2:51:38 AM: Caching artifacts
2:51:38 AM: Started saving node modules
2:51:38 AM: Finished saving node modules
2:51:38 AM: Started saving build plugins
2:51:38 AM: Finished saving build plugins
2:51:38 AM: Started saving corepack cache
2:51:38 AM: Finished saving corepack cache
2:51:38 AM: Started saving pip cache
2:51:38 AM: Finished saving pip cache
2:51:38 AM: Started saving emacs cask dependencies
2:51:38 AM: Finished saving emacs cask dependencies
2:51:38 AM: Started saving maven dependencies
2:51:38 AM: Finished saving maven dependencies
2:51:38 AM: Started saving boot dependencies
2:51:38 AM: Finished saving boot dependencies
2:51:38 AM: Started saving rust rustup cache
2:51:38 AM: Finished saving rust rustup cache
2:51:38 AM: Started saving go dependencies
2:51:38 AM: Finished saving go dependencies
2:51:39 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:51:39 AM: Failing build: Failed to build site
2:51:39 AM: Finished processing build request in 46.202s

not sure - this problem is about your code, not about Netlify - but you should always start any build-related questions by going through this checklist:

If that doesn’t help you find an answer, please do answer the questions at the end to guide us in our further assistance.