React app building with Yarn fails in netlify

Build setting :
Build command yarn build
Publish directory build/
Builds Active

website link : https://awesome-neumann-80a5d0.netlify.app/

The site was deployed without any issues but suddenly now it can’t be deployed.
yarn build command works perfectly on my local pc

   4:20:31 PM: Build ready to start
4:20:32 PM: build-image version: 3031d4c9e432fd7016f6279fc9ad706f9205d845
4:20:32 PM: build-image tag: v3.3.17
4:20:32 PM: buildbot version: 1f35b3abd6e2bf5230d8edf68072840fdec1513f
4:20:33 PM: Fetching cached dependencies
4:20:33 PM: Starting to download cache of 254.3KB
4:20:33 PM: Finished downloading cache in 68.613885ms
4:20:33 PM: Starting to extract cache
4:20:33 PM: Failed to fetch cache, continuing with build
4:20:33 PM: Starting to prepare the repo for build
4:20:33 PM: No cached dependencies found. Cloning fresh repo
4:20:33 PM: git clone https://github.com/rocknegi/PrivateHomeServiceAdmin
4:20:34 PM: Preparing Git Reference refs/heads/master
4:20:35 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'build' versus 'build/' in the Netlify UI
4:20:35 PM: Starting build script
4:20:35 PM: Installing dependencies
4:20:35 PM: Python version set to 2.7
4:20:36 PM: Downloading and installing node v10.21.0...
4:20:37 PM: Downloading https://nodejs.org/dist/v10.21.0/node-v10.21.0-linux-x64.tar.xz...
4:20:37 PM: Computing checksum with sha256sum
4:20:37 PM: Checksums matched!
4:20:40 PM: Now using node v10.21.0 (npm v6.14.4)
4:20:40 PM: Started restoring cached build plugins
4:20:40 PM: Finished restoring cached build plugins
4:20:40 PM: Attempting ruby version 2.6.2, read from environment
4:20:41 PM: Using ruby version 2.6.2
4:20:41 PM: Using PHP version 5.6
4:20:42 PM: 5.2 is already installed.
4:20:42 PM: Using Swift version 5.2
4:20:42 PM: Started restoring cached node modules
4:20:42 PM: Finished restoring cached node modules
4:20:42 PM: Started restoring cached yarn cache
4:20:42 PM: Finished restoring cached yarn cache
4:20:42 PM: Installing yarn at version 1.17.0
4:20:42 PM: Installing Yarn!
4:20:42 PM: > Downloading tarball...
4:20:42 PM: [1/2]: https://yarnpkg.com/downloads/1.17.0/yarn-v1.17.0.tar.gz --> /tmp/yarn.tar.gz.2YzbZkMnf4
4:20:42 PM:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
4:20:42 PM:                                  Dload  Upload   Total   Spent    Left  Speed
4:20:42 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
4:20:42 PM: 100    80  100    80    0     0    276      0 --:--:-- --:--:-- --:--:--   277
4:20:42 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
4:20:42 PM: 100    93  100    93    0     0    155      0 --:--:-- --:--:-- --:--:--   574
4:20:42 PM: 100   630  100   630    0     0    731      0 --:--:-- --:--:-- --:--:--   731
4:20:43 PM: 100 1213k  100 1213k    0     0   952k      0  0:00:01  0:00:01 --:--:--  952k
4:20:43 PM: [2/2]: https://yarnpkg.com/downloads/1.17.0/yarn-v1.17.0.tar.gz.asc --> /tmp/yarn.tar.gz.2YzbZkMnf4.asc
4:20:43 PM: 100    84  100    84    0     0   3091      0 --:--:-- --:--:-- --:--:--  3091
4:20:43 PM: 100    97  100    97    0     0   1791      0 --:--:-- --:--:-- --:--:--  1791
4:20:43 PM: 100   634  100   634    0     0   7400      0 --:--:-- --:--:-- --:--:--  7400
4:20:43 PM:   0   832    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
4:20:43 PM: 100   832  100   832    0     0   6545      0 --:--:-- --:--:-- --:--:--  812k
4:20:43 PM: > Verifying integrity...
4:20:43 PM: gpg: Signature made Fri 14 Jun 2019 06:55:58 PM UTC using RSA key ID 69475BAA
4:20:43 PM: gpg: Good signature from "Yarn Packaging <yarn@dan.cx>"
4:20:43 PM: gpg: WARNING: This key is not certified with a trusted signature!
4:20:43 PM: gpg:          There is no indication that the signature belongs to the owner.
4:20:43 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907  BBB7 1646 B01B 86E5 0310
4:20:43 PM:      Subkey fingerprint: 6D98 490C 6F1A CDDD 448E  4595 4F77 6793 6947 5BAA
4:20:43 PM: > GPG signature looks good
4:20:43 PM: > Extracting to ~/.yarn...
4:20:43 PM: > Adding to $PATH...
4:20:44 PM: > Successfully installed Yarn 1.17.0! Please open another terminal where the `yarn` command will now be available.
4:20:44 PM: Installing NPM modules using Yarn version 1.17.0
4:20:45 PM: yarn install v1.17.0
4:20:45 PM: [1/4] Resolving packages...
4:20:46 PM: [2/4] Fetching packages...
4:21:06 PM: info fsevents@2.1.2: The platform "linux" is incompatible with this module.
4:21:06 PM: info "fsevents@2.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
4:21:07 PM: info fsevents@1.2.12: The platform "linux" is incompatible with this module.
4:21:07 PM: info "fsevents@1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation.
4:21:07 PM: [3/4] Linking dependencies...
4:21:07 PM: warning " > @testing-library/user-event@7.2.1" has unmet peer dependency "@testing-library/dom@>=5".
4:21:07 PM: warning "react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
4:21:16 PM: [4/4] Building fresh packages...
4:21:18 PM: Done in 32.76s.
4:21:18 PM: NPM modules installed using Yarn
4:21:18 PM: Started restoring cached go cache
4:21:18 PM: Finished restoring cached go cache
4:21:18 PM: Installing Go version 1.12
4:21:24 PM: unset GOOS;
4:21:24 PM: unset GOARCH;
4:21:24 PM: export GOROOT='/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64';
4:21:24 PM: export PATH="/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64/bin:${PATH}";
4:21:24 PM: go version >&2;
4:21:24 PM: export GIMME_ENV="/opt/buildhome/.gimme_cache/env/go1.12.linux.amd64.env"
4:21:24 PM: go version go1.12 linux/amd64
4:21:24 PM: Installing missing commands
4:21:24 PM: Verify run directory
4:21:25 PM: ​
4:21:25 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
4:21:25 PM: β”‚        Netlify Build        β”‚
4:21:25 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
4:21:25 PM: ​
4:21:25 PM: ❯ Version
4:21:25 PM:   @netlify/build 2.0.10
4:21:25 PM: ​
4:21:25 PM: ❯ Flags
4:21:25 PM:   deployId: 5ef32ff72dc3158d407c7fde
4:21:25 PM:   mode: buildbot
4:21:25 PM: ​
4:21:25 PM: ❯ Current directory
4:21:25 PM:   /opt/build/repo
4:21:25 PM: ​
4:21:25 PM: ❯ Config file
4:21:25 PM:   No config file was defined: using default values.
4:21:25 PM: ​
4:21:25 PM: ❯ Context
4:21:25 PM:   production
4:21:25 PM: ​
4:21:25 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
4:21:25 PM: β”‚ 1. Build command from settings β”‚
4:21:25 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
4:21:25 PM: ​
4:21:25 PM: $ yarn build
4:21:25 PM: yarn run v1.17.0
4:21:25 PM: $ react-scripts build
4:21:27 PM: Creating an optimized production build...
4:22:13 PM: 
4:22:13 PM: Treating warnings as errors because process.env.CI = true.
4:22:13 PM: Most CI servers set it automatically.
4:22:13 PM: 
4:22:13 PM: Failed to compile.
4:22:13 PM: 
4:22:13 PM: ./src/components/AppData/AppData.js
4:22:13 PM:   Line 13:26:  'setCategory' is assigned a value but never used                                                             no-unused-vars
4:22:13 PM:   Line 79:8:   React Hook useEffect has a missing dependency: 'category'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
4:22:13 PM: ./src/components/Manager/Manager.js
4:22:13 PM:   Line 44:8:  React Hook useEffect has a missing dependency: 'db'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
4:22:13 PM: ./src/components/users/Users.js
4:22:13 PM:   Line 4:16:  'Paper' is defined but never used                                                                      no-unused-vars
4:22:13 PM:   Line 82:8:  React Hook useEffect has a missing dependency: 'db'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
4:22:13 PM: ./src/components/Boys/Boys.js
4:22:13 PM:   Line 52:8:  React Hook useEffect has a missing dependency: 'db'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
4:22:13 PM: ./src/components/Header.js
4:22:13 PM:   Line 5:8:  'Typography' is defined but never used  no-unused-vars
4:22:13 PM:   Line 6:8:  'Button' is defined but never used      no-unused-vars
4:22:13 PM: error Command failed with exit code 1.
4:22:13 PM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
4:22:13 PM: ​
4:22:13 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
4:22:13 PM: β”‚   "build.command" failed    β”‚
4:22:13 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
4:22:13 PM: ​
4:22:13 PM:   Error message
4:22:13 PM:   Command failed with exit code 1: yarn build
4:22:13 PM: ​
4:22:13 PM:   Error location
4:22:13 PM:   In Build command from settings:
4:22:13 PM:   yarn build
4:22:13 PM: ​
4:22:13 PM:   Resolved config
4:22:13 PM:   build:
4:22:13 PM:     command: yarn build
4:22:13 PM:     publish: /opt/build/repo/build
4:22:13 PM: Caching artifacts
4:22:13 PM: Started saving node modules
4:22:13 PM: Finished saving node modules
4:22:13 PM: Started saving build plugins
4:22:13 PM: Finished saving build plugins
4:22:13 PM: Started saving yarn cache
4:22:13 PM: Finished saving yarn cache
4:22:13 PM: Started saving pip cache
4:22:20 PM: Finished saving pip cache
4:22:20 PM: Started saving emacs cask dependencies
4:22:20 PM: Finished saving emacs cask dependencies
4:22:20 PM: Started saving maven dependencies
4:22:20 PM: Finished saving maven dependencies
4:22:20 PM: Started saving boot dependencies
4:22:20 PM: Finished saving boot dependencies
4:22:20 PM: Started saving go dependencies
4:22:22 PM: Finished saving go dependencies
4:22:29 PM: Error running command: Build script returned non-zero exit code: 1
4:22:29 PM: Failing build: Failed to build site
4:22:29 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1
4:22:29 PM: Finished processing build request in 1m56.27164288s

Hi there, give this post a read through, we think it should help:

1 Like