Failed to deploy after deploying previously

Hi - I’d appreciate help with trying to debug this deployment error. I had manual deploy on and tried switching to continuous deploy and it’s no longer deploying for me. I made a recent commit so I’m not sure if this is having an effect? My repo is here if anyone wants to check the code.

Site

Build Log

8:21:55 AM: build-image version: 5ad27658ebdf9c1e4379d77be303c2a3e3daa7bf (focal)
8:21:55 AM: buildbot version: 5ad27658ebdf9c1e4379d77be303c2a3e3daa7bf
8:21:56 AM: Building without cache
8:21:56 AM: Starting to prepare the repo for build
8:21:56 AM: No cached dependencies found. Cloning fresh repo
8:21:56 AM: git clone --filter=blob:none https://github.com/kyrikoni/kk-frontend-portfolio-project
8:21:56 AM: Preparing Git Reference refs/heads/main
8:21:57 AM: Parsing package.json dependencies
8:21:58 AM: Starting build script
8:21:58 AM: Installing dependencies
8:21:58 AM: Python version set to 2.7
8:21:59 AM: v16.19.1 is already installed.
8:21:59 AM: Now using node v16.19.1 (npm v8.19.3)
8:21:59 AM: Enabling Node.js Corepack
8:21:59 AM: Started restoring cached build plugins
8:21:59 AM: Finished restoring cached build plugins
8:21:59 AM: Attempting Ruby version 2.7.2, read from environment
8:22:00 AM: Using Ruby version 2.7.2
8:22:00 AM: Using PHP version 8.0
8:22:00 AM: Started restoring cached corepack dependencies
8:22:00 AM: Finished restoring cached corepack dependencies
8:22:00 AM: No npm workspaces detected
8:22:00 AM: Started restoring cached node modules
8:22:00 AM: Finished restoring cached node modules
8:22:00 AM: Installing npm packages using npm version 8.19.3
8:22:04 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: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
8:22:04 AM: npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
8:22:04 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
8:22:07 AM: npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
8:22:12 AM: added 1478 packages, and audited 1479 packages in 12s
8:22:12 AM: 231 packages are looking for funding
8:22:12 AM:   run `npm fund` for details
8:22:12 AM: 6 high severity vulnerabilities
8:22:12 AM: To address all issues (including breaking changes), run:
8:22:12 AM:   npm audit fix --force
8:22:12 AM: Run `npm audit` for details.
8:22:12 AM: npm packages installed
8:22:12 AM: Started restoring cached go cache
8:22:12 AM: Finished restoring cached go cache
8:22:12 AM: go version go1.19.6 linux/amd64
8:22:13 AM: Detected 1 framework(s)
8:22:13 AM: "create-react-app" at version "5.0.1"
8:22:13 AM: Section completed: initializing
8:22:14 AM: ​
8:22:14 AM:   Netlify Build                                                 
8:22:14 AM: ────────────────────────────────────────────────────────────────
8:22:14 AM: ​
8:22:14 AM: ❯ Version
8:22:14 AM:   @netlify/build 29.5.8
8:22:14 AM: ​
8:22:14 AM: ❯ Flags
8:22:14 AM:   baseRelDir: true
8:22:14 AM:   buildId: 6401ae21a83639250a42b684
8:22:14 AM:   deployId: 6401ae21a83639250a42b686
8:22:14 AM: ​
8:22:14 AM: ❯ Current directory
8:22:14 AM:   /opt/build/repo
8:22:14 AM: ​
8:22:14 AM: ❯ Config file
8:22:14 AM:   No config file was defined: using default values.
8:22:14 AM: ​
8:22:14 AM: ❯ Context
8:22:14 AM:   production
8:22:14 AM: ​
8:22:14 AM:   1. Build command from Netlify app                             
8:22:14 AM: ────────────────────────────────────────────────────────────────
8:22:14 AM: ​
8:22:14 AM: $ npm run build
8:22:14 AM: > kk-frontend-portfolio-project@0.1.0 build
8:22:14 AM: > react-scripts build
8:22:15 AM: Creating an optimized production build...
8:22:22 AM: 
8:22:22 AM: Treating warnings as errors because process.env.CI = true.
8:22:22 AM: Most CI servers set it automatically.
8:22:22 AM: 
8:22:22 AM: Failed to compile.
8:22:22 AM: 
8:22:22 AM: [eslint]
8:22:22 AM: src/components/ReviewCard.jsx
8:22:22 AM:   Line 13:9:  Redundant alt attribute. Screen-readers already announce `img` tags as an image. You don’t need to use the words `image`, `photo,` or `picture` (or any specified custom words) in the alt prop  jsx-a11y/img-redundant-alt
8:22:22 AM: src/components/SingleReview.jsx
8:22:22 AM:   Line 27:6:  React Hook useEffect has a missing dependency: 'setIsLoading'. Either include it or remove the dependency array. If 'setIsLoading' changes too often, find the parent component that defines it and wrap that definition in useCallback  react-hooks/exhaustive-deps
8:22:22 AM:   Line 45:9:  Redundant alt attribute. Screen-readers already announce `img` tags as an image. You don’t need to use the words `image`, `photo,` or `picture` (or any specified custom words) in the alt prop                                          jsx-a11y/img-redundant-alt
8:22:22 AM: ​
8:22:22 AM:   "build.command" failed                                        
8:22:22 AM: ────────────────────────────────────────────────────────────────
8:22:22 AM: ​
8:22:22 AM:   Error message
8:22:22 AM:   Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
8:22:22 AM: ​
8:22:22 AM:   Error location
8:22:22 AM:   In Build command from Netlify app:
8:22:22 AM:   npm run build
8:22:22 AM: ​
8:22:22 AM:   Resolved config
8:22:22 AM:   build:
8:22:22 AM:     command: npm run build
8:22:22 AM:     commandOrigin: ui
8:22:22 AM:     publish: /opt/build/repo/build
8:22:22 AM:     publishOrigin: ui
8:22:22 AM: Caching artifacts
8:22:22 AM: Started saving node modules
8:22:22 AM: Finished saving node modules
8:22:22 AM: Started saving build plugins
8:22:22 AM: Finished saving build plugins
8:22:22 AM: Started saving corepack cache
8:22:22 AM: Finished saving corepack cache
8:22:22 AM: Started saving pip cache
8:22:22 AM: Finished saving pip cache
8:22:22 AM: Started saving emacs cask dependencies
8:22:22 AM: Finished saving emacs cask dependencies
8:22:22 AM: Started saving maven dependencies
8:22:22 AM: Finished saving maven dependencies
8:22:22 AM: Started saving boot dependencies
8:22:22 AM: Finished saving boot dependencies
8:22:22 AM: Started saving rust rustup cache
8:22:22 AM: Finished saving rust rustup cache
8:22:22 AM: Started saving go dependencies
8:22:22 AM: Finished saving go dependencies
8:22:23 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
8:22:23 AM: Failing build: Failed to build site
8:22:23 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
8:22:23 AM: Finished processing build request in 27.967s

Blockquote

Hi @kyrikoni, thanks for the post and welcome.

Kindly set the CI to be false during your build command.

Go to your site page and click on site settings and then click on build and deploy. Click on Edit settings under Build settings and change the build command to:

CI=false npm run build

Now, rebuild your deployment to see if it works.

Also you don’t need to use the words image, photo, or picture (or any specified custom words) in the alt prop for the components src/components/ReviewCard.jsx and src/components/SingleReview.jsx. Change the alt prop to a descriptive text.

Let me know the outcome.

Thanks.

Thanks for the quick response, this worked! I’ve changed the alt attributes too. Thanks for your help!

1 Like

Hi @kyrikoni, glad to know the suggestion helped solve your problem.
Thanks.

@kyrikoni thanks so much for confirming you resolved your problem. Good luck ( :