I am new to the react js and I have created a react js app which is running fine on my local browser but the compilation is getting failed while deploying on netlify with a warning message as (errors because process.env.CI = true). I am not able to get in which file i need to make changes.
github link: GitHub - ajitkrsingh0786/users-profile-react-app
netlify link: https://objective-swirles-56a148.netlify.app/
Deploy log
6:56:50 PM: Build ready to start
6:56:52 PM: build-image version: b0258b965567defc4a2d7e2f2dec2e00c8f73ad6
6:56:52 PM: build-image tag: v3.4.1
6:56:52 PM: buildbot version: 0e43e88a84db6c7a5f9e545ccf1a68b4e8b829b1
6:56:52 PM: Building without cache
6:56:52 PM: Starting to prepare the repo for build
6:56:52 PM: No cached dependencies found. Cloning fresh repo
6:56:52 PM: git clone GitHub - ajitkrsingh0786/users-profile-react-app
6:56:53 PM: Preparing Git Reference refs/heads/master
6:56:54 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘build’ versus ‘build/’ in the Netlify UI
6:56:54 PM: Starting build script
6:56:54 PM: Installing dependencies
6:56:54 PM: Python version set to 2.7
6:56:56 PM: v12.18.0 is already installed.
6:56:56 PM: Now using node v12.18.0 (npm v6.14.4)
6:56:56 PM: Started restoring cached build plugins
6:56:56 PM: Finished restoring cached build plugins
6:56:57 PM: Attempting ruby version 2.7.1, read from environment
6:56:58 PM: Using ruby version 2.7.1
6:56:58 PM: Using PHP version 5.6
6:56:58 PM: 5.2 is already installed.
6:56:58 PM: Using Swift version 5.2
6:56:58 PM: Started restoring cached node modules
6:56:58 PM: Finished restoring cached node modules
6:56:59 PM: Installing NPM modules using NPM version 6.14.4
6:57:33 PM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
6:57:33 PM: > node -e “try{require(‘./postinstall’)}catch(e){}”
6:57:33 PM: > core-js@3.6.5 postinstall /opt/build/repo/node_modules/core-js
6:57:33 PM: > node -e “try{require(‘./postinstall’)}catch(e){}”
6:57:33 PM: > core-js-pure@3.6.5 postinstall /opt/build/repo/node_modules/core-js-pure
6:57:33 PM: > node -e “try{require(‘./postinstall’)}catch(e){}”
6:57:35 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
6:57:35 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
6:57:35 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
6:57:35 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
6:57:35 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/jest-haste-map/node_modules/fsevents):
6:57:35 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
6:57:35 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
6:57:35 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
6:57:35 PM: added 1675 packages from 840 contributors and audited 1679 packages in 35.852s
6:57:37 PM: 71 packages are looking for funding
6:57:37 PM: run npm fund
for details
6:57:37 PM: found 1 moderate severity vulnerability
6:57:37 PM: run npm audit fix
to fix them, or npm audit
for details
6:57:37 PM: NPM modules installed
6:57:37 PM: Started restoring cached go cache
6:57:37 PM: Finished restoring cached go cache
6:57:37 PM: go version go1.14.4 linux/amd64
6:57:37 PM: go version go1.14.4 linux/amd64
6:57:37 PM: Installing missing commands
6:57:37 PM: Verify run directory
6:57:39 PM:
6:57:39 PM: ┌─────────────────────────────┐
6:57:39 PM: │ Netlify Build │
6:57:39 PM: └─────────────────────────────┘
6:57:39 PM:
6:57:39 PM: ❯ Version
6:57:39 PM: @netlify/build 4.6.3
6:57:39 PM:
6:57:39 PM: ❯ Flags
6:57:39 PM: deployId: 5f772a9a4819cc2178bf0188
6:57:39 PM: mode: buildbot
6:57:39 PM:
6:57:39 PM: ❯ Current directory
6:57:39 PM: /opt/build/repo
6:57:39 PM:
6:57:39 PM: ❯ Config file
6:57:39 PM: No config file was defined: using default values.
6:57:39 PM:
6:57:39 PM: ❯ Context
6:57:39 PM: production
6:57:39 PM:
6:57:39 PM: ┌───────────────────────────────────┐
6:57:39 PM: │ 1. Build command from Netlify app │
6:57:39 PM: └───────────────────────────────────┘
6:57:39 PM:
6:57:39 PM: $ npm run build
6:57:39 PM: > users-profile-react-app@0.1.0 build /opt/build/repo
6:57:39 PM: > react-scripts build
6:57:40 PM: Creating an optimized production build…
6:57:58 PM:
6:57:58 PM: Treating warnings as errors because process.env.CI = true.
6:57:58 PM: Most CI servers set it automatically.
6:57:58 PM:
6:57:58 PM: Failed to compile.
6:57:58 PM:
6:57:58 PM: ./src/components/UsersList.js
6:57:58 PM: Line 2:16: ‘CardImg’ is defined but never used no-unused-vars
6:57:58 PM: Line 2:25: ‘CardImgOverlay’ is defined but never used no-unused-vars
6:57:58 PM: Line 2:41: ‘CardText’ is defined but never used no-unused-vars
6:57:58 PM: Line 3:5: ‘CardTitle’ is defined but never used no-unused-vars
6:57:58 PM: ./src/components/UserHomePage.js
6:57:58 PM: Line 7:11: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text
6:57:58 PM: npm ERR! code ELIFECYCLE
6:57:58 PM: npm ERR! errno 1
6:57:58 PM: npm ERR! users-profile-react-app@0.1.0 build: react-scripts build
6:57:58 PM: npm ERR! Exit status 1
6:57:58 PM: npm ERR!
6:57:58 PM: npm ERR! Failed at the users-profile-react-app@0.1.0 build script.
6:57:58 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
6:57:58 PM: npm ERR! A complete log of this run can be found in:
6:57:58 PM: npm ERR! /opt/buildhome/.npm/_logs/2020-10-02T13_27_58_567Z-debug.log
6:57:58 PM:
6:57:58 PM: ┌─────────────────────────────┐
6:57:58 PM: │ “build.command” failed │
6:57:58 PM: └─────────────────────────────┘
6:57:58 PM:
6:57:58 PM: Error message
6:57:58 PM: Command failed with exit code 1: npm run build
6:57:58 PM:
6:57:58 PM: Error location
6:57:58 PM: In Build command from Netlify app:
6:57:58 PM: npm run build
6:57:58 PM:
6:57:58 PM: Resolved config
6:57:58 PM: build:
6:57:58 PM: command: npm run build
6:57:58 PM: commandOrigin: ui
6:57:58 PM: publish: /opt/build/repo/build
6:57:58 PM: Caching artifacts
6:57:58 PM: Started saving node modules
6:57:58 PM: Finished saving node modules
6:57:58 PM: Started saving build plugins
6:57:58 PM: Finished saving build plugins
6:57:58 PM: Started saving pip cache
6:57:58 PM: Finished saving pip cache
6:57:58 PM: Started saving emacs cask dependencies
6:57:58 PM: Finished saving emacs cask dependencies
6:57:58 PM: Started saving maven dependencies
6:57:58 PM: Finished saving maven dependencies
6:57:58 PM: Started saving boot dependencies
6:57:58 PM: Finished saving boot dependencies
6:57:58 PM: Started saving go dependencies
6:57:58 PM: Finished saving go dependencies
6:58:01 PM: Error running command: Build script returned non-zero exit code: 2
6:58:01 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
6:58:01 PM: Failing build: Failed to build site
6:58:02 PM: Finished processing build request in 1m9.965222687s