Can't deploy furry friends react app

Getting these errors when I try to deploy my site. I have tried to change the build command as well as check the env variables but to know luck. Any advice would be awesome thanks in advance

8:42:15 PM: build-image version: 4c0c1cadee6a31c9bb8d824514030009c4c05c6a (focal)
8:42:15 PM: build-image tag: v4.15.0
8:42:15 PM: buildbot version: 7f69cd6d63595b50ebbaee3c273db486f3eb0529
8:42:15 PM: Fetching cached dependencies
8:42:15 PM: Failed to fetch cache, continuing with build
8:42:15 PM: Starting to prepare the repo for build
8:42:15 PM: No cached dependencies found. Cloning fresh repo
8:42:15 PM: git clone GitHub - dvarmstrong/furry-friends-two: A basic React app that displays various dogs from the Dog API
8:42:16 PM: Preparing Git Reference refs/heads/main
8:42:16 PM: Parsing package.json dependencies
8:42:17 PM: Section completed: initializing
8:42:17 PM: Starting build script
8:42:17 PM: Installing dependencies
8:42:17 PM: Python version set to 2.7
8:42:18 PM: v16.18.1 is already installed.
8:42:18 PM: Now using node v16.18.1 (npm v8.19.2)
8:42:18 PM: Enabling node corepack
8:42:18 PM: Started restoring cached build plugins
8:42:18 PM: Finished restoring cached build plugins
8:42:18 PM: Attempting ruby version 2.7.2, read from environment
8:42:19 PM: Using ruby version 2.7.2
8:42:19 PM: Using PHP version 8.0
8:42:19 PM: No npm workspaces detected
8:42:19 PM: Started restoring cached node modules
8:42:19 PM: Finished restoring cached node modules
8:42:20 PM: Installing NPM modules using NPM version 8.19.2
8:42:24 PM: 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
8:42:26 PM: npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
8:42:31 PM: added 1468 packages, and audited 1469 packages in 11s
8:42:31 PM: 226 packages are looking for funding
8:42:31 PM: run npm fund for details
8:42:31 PM: 6 high severity vulnerabilities
8:42:31 PM: To address all issues (including breaking changes), run:
8:42:31 PM: npm audit fix --force
8:42:31 PM: Run npm audit for details.
8:42:31 PM: NPM modules installed
8:42:31 PM: Creating package sha
8:42:31 PM: Started restoring cached go cache
8:42:31 PM: Finished restoring cached go cache
8:42:32 PM: Installing Go version 1.19.3 (requested 1.19.x)
8:42:39 PM: unset GOOS;
8:42:39 PM: unset GOARCH;
8:42:39 PM: export GOROOT=β€˜/opt/buildhome/.gimme/versions/go1.19.3.linux.amd64’;
8:42:39 PM: export PATH=β€œ/opt/buildhome/.gimme/versions/go1.19.3.linux.amd64/bin:${PATH}”;
8:42:39 PM: go version >&2;
8:42:39 PM: export GIMME_ENV=β€œ/opt/buildhome/.gimme/env/go1.19.3.linux.amd64.env”
8:42:39 PM: go version go1.19.3 linux/amd64
8:42:39 PM: Detected 1 framework(s)
8:42:39 PM: β€œcreate-react-app” at version β€œ5.0.1”
8:42:39 PM: Installing missing commands
8:42:39 PM: Verify run directory
8:42:40 PM: ​
8:42:40 PM: ────────────────────────────────────────────────────────────────
8:42:40 PM: Netlify Build
8:42:40 PM: ────────────────────────────────────────────────────────────────
8:42:40 PM: ​
8:42:40 PM: ❯ Version
8:42:40 PM: @netlify/build 28.4.4
8:42:40 PM: ​
8:42:40 PM: ❯ Flags
8:42:40 PM: baseRelDir: true
8:42:40 PM: buildId: 638957f6ff67560e51c3c439
8:42:40 PM: deployId: 638957f6ff67560e51c3c43b
8:42:40 PM: ​
8:42:40 PM: ❯ Current directory
8:42:40 PM: /opt/build/repo
8:42:40 PM: ​
8:42:40 PM: ❯ Config file
8:42:40 PM: No config file was defined: using default values.
8:42:40 PM: ​
8:42:40 PM: ❯ Context
8:42:40 PM: production
8:42:40 PM: ​
8:42:40 PM: ────────────────────────────────────────────────────────────────
8:42:40 PM: 1. Build command from Netlify app
8:42:40 PM: ────────────────────────────────────────────────────────────────
8:42:40 PM: ​
8:42:40 PM: $ npm run build
8:42:41 PM: > furry-friends-two@0.1.0 build
8:42:41 PM: > react-scripts build
8:42:42 PM: Creating an optimized production build…
8:42:48 PM:
8:42:48 PM: Treating warnings as errors because process.env.CI = true.
8:42:48 PM: Most CI servers set it automatically.
8:42:48 PM:
8:42:48 PM: Failed to compile.
8:42:48 PM:
8:42:48 PM: [eslint]
8:42:48 PM: src/components/BreedList.jsx
8:42:48 PM: Line 5:1: Assign arrow function to a variable before exporting as module default import/no-anonymous-default-export
8:42:48 PM: Line 62:17: The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: eslint-plugin-jsx-a11y/anchor-is-valid.md at 20b082a890f8e27320c6b2b3587edc6d0b735c97 Β· jsx-eslint/eslint-plugin-jsx-a11y Β· GitHub jsx-a11y/anchor-is-valid
8:42:48 PM: Line 65:17: The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: eslint-plugin-jsx-a11y/anchor-is-valid.md at 20b082a890f8e27320c6b2b3587edc6d0b735c97 Β· jsx-eslint/eslint-plugin-jsx-a11y Β· GitHub jsx-a11y/anchor-is-valid
8:42:48 PM: src/components/DogCardInfo.jsx
8:42:48 PM: Line 3:1: Assign arrow function to a variable before exporting as module default import/no-anonymous-default-export
8:42:48 PM: ​
8:42:48 PM: ────────────────────────────────────────────────────────────────
8:42:48 PM: β€œbuild.command” failed
8:42:48 PM: ────────────────────────────────────────────────────────────────
8:42:48 PM: ​
8:42:48 PM: Error message
8:42:48 PM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
8:42:48 PM: ​
8:42:48 PM: Error location
8:42:48 PM: In Build command from Netlify app:
8:42:48 PM: npm run build
8:42:48 PM: ​
8:42:48 PM: Resolved config
8:42:48 PM: build:
8:42:48 PM: command: npm run build
8:42:49 PM: Creating deploy upload records
8:42:48 PM: commandOrigin: ui
8:42:48 PM: environment:
8:42:48 PM: - REACT_APP_DOG_API_KEY
8:42:48 PM: - REACT_APP_DOG_API_URL
8:42:48 PM: publish: /opt/build/repo/build
8:42:49 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)
8:42:48 PM: publishOrigin: ui
8:42:48 PM: Caching artifacts
8:42:48 PM: Started saving node modules
8:42:48 PM: Finished saving node modules
8:42:48 PM: Started saving build plugins
8:42:48 PM: Finished saving build plugins
8:42:48 PM: Started saving pip cache
8:42:48 PM: Finished saving pip cache
8:42:48 PM: Started saving emacs cask dependencies
8:42:48 PM: Finished saving emacs cask dependencies
8:42:48 PM: Started saving maven dependencies
8:42:48 PM: Finished saving maven dependencies
8:42:48 PM: Started saving boot dependencies
8:42:48 PM: Finished saving boot dependencies
8:42:48 PM: Started saving rust rustup cache
8:42:48 PM: Finished saving rust rustup cache
8:42:48 PM: Started saving go dependencies
8:42:48 PM: Finished saving go dependencies
8:42:49 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
8:42:49 PM: Failing build: Failed to build site
8:42:50 PM: Finished processing build request in 34.390715321s

Fixed the issue had to change my build command

1 Like