This is my first time using Netlify and I am trying to host one of my GitHub repo on Netlify.
When I import the repo to the dashboard, I got the error message saying: ““build.command” failed” and this is the log.
9:13:26 AM: build-image version: a2d22d22e4555d1ef0a972ed14a0a4b366ad20c4 (focal)
9:13:26 AM: build-image tag: v4.16.3
9:13:26 AM: buildbot version: 0d92ba804851e1768a79721ec5ad312cd15c4ac9
9:13:26 AM: Fetching cached dependencies
9:13:26 AM: Starting to download cache of 104.6MB
9:13:27 AM: Finished downloading cache in 1.060066761s
9:13:27 AM: Starting to extract cache
9:13:29 AM: Finished extracting cache in 1.976437594s
9:13:29 AM: Finished fetching cache in 3.075633238s
9:13:29 AM: Starting to prepare the repo for build
9:13:29 AM: Preparing Git Reference refs/heads/main
9:13:30 AM: Parsing package.json dependencies
9:13:32 AM: Starting build script
9:13:32 AM: Installing dependencies
9:13:32 AM: Python version set to 2.7
9:13:32 AM: Started restoring cached Node.js version
9:13:33 AM: Finished restoring cached Node.js version
9:13:33 AM: v16.19.0 is already installed.
9:13:34 AM: Now using node v16.19.0 (npm v8.19.3)
9:13:34 AM: Enabling Node.js Corepack
9:13:34 AM: Started restoring cached build plugins
9:13:34 AM: Finished restoring cached build plugins
9:13:34 AM: Attempting Ruby version 2.7.2, read from environment
9:13:34 AM: Using Ruby version 2.7.2
9:13:35 AM: Using PHP version 8.0
9:13:35 AM: Started restoring cached corepack dependencies
9:13:35 AM: mv: cannot move ‘/opt/build/cache/.node/corepack’ to ‘/opt/buildhome/.node/corepack’: No such file or directory
9:13:35 AM: Finished restoring cached corepack dependencies
9:13:35 AM: No npm workspaces detected
9:13:35 AM: Started restoring cached node modules
9:13:35 AM: Finished restoring cached node modules
9:13:35 AM: Bypassing sha validation. Running pre & post install scripts
9:13:35 AM: Installing npm packages using npm version 8.19.3
9:13:38 AM: added 1 package, and audited 1470 packages in 3s
9:13:38 AM: 231 packages are looking for funding
9:13:38 AM: run npm fund
for details
9:13:38 AM: 6 high severity vulnerabilities
9:13:38 AM: To address all issues (including breaking changes), run:
9:13:38 AM: npm audit fix --force
9:13:38 AM: Run npm audit
for details.
9:13:38 AM: npm packages installed
9:13:38 AM: Started restoring cached go cache
9:13:38 AM: Finished restoring cached go cache
9:13:38 AM: go version go1.19.4 linux/amd64
9:13:38 AM: Detected 1 framework(s)
9:13:38 AM: “create-react-app” at version “5.0.1”
9:13:38 AM: Installing missing commands
9:13:38 AM: Verify run directory
9:13:38 AM: Section completed: initializing
9:13:40 AM:
9:13:40 AM: Netlify Build
9:13:40 AM: ────────────────────────────────────────────────────────────────
9:13:40 AM:
9:13:40 AM: ❯ Version
9:13:40 AM: @netlify/build 29.4.1
9:13:40 AM:
9:13:40 AM: ❯ Flags
9:13:40 AM: baseRelDir: true
9:13:40 AM: buildId: 63bd72847d8e6d0008198b11
9:13:40 AM: deployId: 63bd72847d8e6d0008198b13
9:13:40 AM:
9:13:40 AM: ❯ Current directory
9:13:40 AM: /opt/build/repo
9:13:40 AM:
9:13:40 AM: ❯ Config file
9:13:40 AM: No config file was defined: using default values.
9:13:40 AM:
9:13:40 AM: ❯ Context
9:13:40 AM: production
9:13:40 AM:
9:13:40 AM: 1. Build command from Netlify app
9:13:40 AM: ────────────────────────────────────────────────────────────────
9:13:40 AM:
9:13:40 AM: $ npm run build
9:13:40 AM: > myat-portfolio-site@0.1.0 build
9:13:40 AM: > react-scripts build
9:13:41 AM: Creating an optimized production build…
9:13:57 AM:
9:13:57 AM: Treating warnings as errors because process.env.CI = true.
9:13:57 AM: Most CI servers set it automatically.
9:13:57 AM:
9:13:57 AM: Failed to compile.
9:13:57 AM:
9:13:57 AM: [eslint]
9:13:57 AM: src/components/Experiences.js
9:13:57 AM: Line 27:29: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text
9:13:57 AM: Line 38:29: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text
9:13:57 AM: Line 49:29: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text
9:13:57 AM: Line 62:29: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text
9:13:57 AM: Line 73:29: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text
9:13:57 AM: Line 84:29: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text
9:13:57 AM: src/components/Profile.js
9:13:57 AM: Line 42:17: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text
9:13:57 AM:
9:13:57 AM: “build.command” failed
9:13:58 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)
9:13:57 AM: ────────────────────────────────────────────────────────────────
9:13:57 AM:
9:13:57 AM: Error message
9:13:57 AM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
9:13:57 AM:
9:13:57 AM: Error location
9:13:57 AM: In Build command from Netlify app:
9:13:57 AM: npm run build
9:13:57 AM:
9:13:57 AM: Resolved config
9:13:57 AM: build:
9:13:57 AM: command: npm run build
9:13:57 AM: commandOrigin: ui
9:13:57 AM: publish: /opt/build/repo/build
9:13:57 AM: publishOrigin: ui
9:13:58 AM: Caching artifacts
9:13:58 AM: Started saving node modules
9:13:58 AM: Finished saving node modules
9:13:58 AM: Started saving build plugins
9:13:58 AM: Finished saving build plugins
9:13:58 AM: Started saving pip cache
9:13:58 AM: Finished saving pip cache
9:13:58 AM: Started saving emacs cask dependencies
9:13:58 AM: Finished saving emacs cask dependencies
9:13:58 AM: Started saving maven dependencies
9:13:58 AM: Finished saving maven dependencies
9:13:58 AM: Started saving boot dependencies
9:13:58 AM: Finished saving boot dependencies
9:13:58 AM: Started saving rust rustup cache
9:13:58 AM: Finished saving rust rustup cache
9:13:58 AM: Started saving go dependencies
9:13:58 AM: Finished saving go dependencies
9:13:58 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:13:58 AM: Failing build: Failed to build site
9:13:58 AM: Finished processing build request in 32.083589332s