Build script returned non-zero exit code: 2

https://app.netlify.com/sites/trusting-austin-c50b3f

Please help!

8:59:21 PM: Build ready to start
8:59:37 PM: build-image version: 122b31996ccaffd45d820a452d6227f8312110cc (focal)
8:59:37 PM: build-image tag: v4.5.3
8:59:37 PM: buildbot version: 7eafb394e33f42f945c880ce4ac17c149867813a
8:59:37 PM: Fetching cached dependencies
8:59:37 PM: Failed to fetch cache, continuing with build
8:59:37 PM: Starting to prepare the repo for build
8:59:37 PM: No cached dependencies found. Cloning fresh repo
8:59:37 PM: git clone GitHub - markolsen619/Walrus-Dao
8:59:38 PM: Preparing Git Reference refs/heads/walrusdao
8:59:38 PM: Parsing package.json dependencies
8:59:39 PM: Starting build script
8:59:39 PM: Installing dependencies
8:59:39 PM: Python version set to 2.7
8:59:39 PM: Attempting node version β€˜16’ from .nvmrc
8:59:40 PM: Downloading and installing node v16.14.0…
8:59:40 PM: Downloading https://nodejs.org/dist/v16.14.0/node-v16.14.0-linux-x64.tar.xz…
8:59:40 PM: Computing checksum with sha256sum
8:59:40 PM: Checksums matched!
8:59:43 PM: Now using node v16.14.0 (npm v8.3.1)
8:59:43 PM: Started restoring cached build plugins
8:59:43 PM: Finished restoring cached build plugins
8:59:43 PM: Attempting ruby version 2.7.2, read from environment
8:59:44 PM: Using ruby version 2.7.2
8:59:45 PM: Using PHP version 8.0
8:59:45 PM: Started restoring cached node modules
8:59:45 PM: Finished restoring cached node modules
8:59:45 PM: Installing NPM modules using NPM version 8.3.1
9:00:00 PM: npm WARN deprecated safe-event-emitter@1.0.1: Renamed to @metamask/safe-event-emitter
9:00:03 PM: npm WARN deprecated eth-sig-util@1.4.2: Deprecated in favor of β€˜@metamask/eth-sig-util’
9:00:05 PM: npm WARN deprecated @walletconnect/mobile-registry@1.4.0: Deprecated in favor of dynamic registry available from: GitHub - WalletConnect/walletconnect-registry: App Registry for WalletConnect Protocol
9:00:07 PM: npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
9:00:08 PM: npm WARN deprecated walletlink@2.5.0: WARNING: This project has been renamed to @coinbase/wallet-sdk. Install using @coinbase/wallet-sdk instead.
9:00:14 PM: added 1604 packages, and audited 1605 packages in 29s
9:00:14 PM: 211 packages are looking for funding
9:00:14 PM: run npm fund for details
9:00:14 PM: 18 moderate severity vulnerabilities
9:00:14 PM: To address all issues possible (including breaking changes), run:
9:00:14 PM: npm audit fix --force
9:00:14 PM: Some issues need review, and may require choosing
9:00:14 PM: a different dependency.
9:00:14 PM: Run npm audit for details.
9:00:14 PM: NPM modules installed
9:00:15 PM: Started restoring cached go cache
9:00:15 PM: Finished restoring cached go cache
9:00:15 PM: go version go1.16.5 linux/amd64
9:00:15 PM: go version go1.16.5 linux/amd64
9:00:15 PM: Installing missing commands
9:00:15 PM: Verify run directory
9:00:16 PM: ​
9:00:16 PM: ────────────────────────────────────────────────────────────────
9:00:16 PM: Netlify Build
9:00:16 PM: ────────────────────────────────────────────────────────────────
9:00:16 PM: ​
9:00:16 PM: ❯ Version
9:00:16 PM: @netlify/build 26.4.0
9:00:16 PM: ​
9:00:16 PM: ❯ Flags
9:00:16 PM: baseRelDir: true
9:00:16 PM: buildId: 62300f193d7b99371c7664f9
9:00:16 PM: deployId: 62300f193d7b99371c7664fb
9:00:16 PM: ​
9:00:16 PM: ❯ Current directory
9:00:16 PM: /opt/build/repo
9:00:16 PM: ​
9:00:16 PM: ❯ Config file
9:00:16 PM: No config file was defined: using default values.
9:00:16 PM: ​
9:00:16 PM: ❯ Context
9:00:16 PM: production
9:00:16 PM: ​
9:00:16 PM: ────────────────────────────────────────────────────────────────
9:00:16 PM: 1. Build command from Netlify app
9:00:16 PM: ────────────────────────────────────────────────────────────────
9:00:16 PM: ​
9:00:16 PM: $ npm run build
9:00:16 PM: > mydao@0.1.0 build
9:00:16 PM: > react-scripts build
9:00:17 PM: Creating an optimized production build…
9:01:17 PM:
9:01:17 PM: Treating warnings as errors because process.env.CI = true.
9:01:17 PM: Most CI servers set it automatically.
9:01:17 PM:
9:01:17 PM: Failed to compile.
9:01:17 PM:
9:01:17 PM: src/App.jsx
9:01:17 PM: Line 179:6: React Hook useEffect has a missing dependency: β€˜error’. Either include it or remove the dependency array react-hooks/exhaustive-deps
9:01:17 PM: ​
9:01:17 PM: ────────────────────────────────────────────────────────────────
9:01:17 PM: β€œbuild.command” failed
9:01:17 PM: ────────────────────────────────────────────────────────────────
9:01:17 PM: ​
9:01:17 PM: Error message
9:01:17 PM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
9:01:17 PM: ​
9:01:17 PM: Error location
9:01:17 PM: In Build command from Netlify app:
9:01:17 PM: npm run build
9:01:17 PM: ​
9:01:17 PM: Resolved config
9:01:17 PM: build:
9:01:17 PM: command: npm run build
9:01:17 PM: commandOrigin: ui
9:01:17 PM: publish: /opt/build/repo/build
9:01:17 PM: publishOrigin: ui
9:01:18 PM: Caching artifacts
9:01:18 PM: Started saving node modules
9:01:18 PM: Finished saving node modules
9:01:18 PM: Started saving build plugins
9:01:18 PM: Finished saving build plugins
9:01:18 PM: Started saving pip cache
9:01:18 PM: Finished saving pip cache
9:01:18 PM: Started saving emacs cask dependencies
9:01:18 PM: Finished saving emacs cask dependencies
9:01:18 PM: Started saving maven dependencies
9:01:18 PM: Finished saving maven dependencies
9:01:18 PM: Started saving boot dependencies
9:01:18 PM: Finished saving boot dependencies
9:01:18 PM: Started saving rust rustup cache
9:01:18 PM: Finished saving rust rustup cache
9:01:18 PM: Started saving go dependencies
9:01:18 PM: Finished saving go dependencies
9:01:20 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:01:20 PM: Creating deploy upload records
9:01:20 PM: Failing build: Failed to build site
9:01:20 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)
9:01:20 PM: Finished processing build request in 1m43.335951001s

1 Like

Let’s see them and follow the following steps given below
11:59:46 AM: Build ready to start
11:59:48 AM: build-image version: b0258b965567defc4a2d7e2f2dec2e00c8f73ad6
11:59:48 AM: build-image tag: v3.4.1
11:59:48 AM: buil the dbot version: 0a44c930054be748eff0c581d346282fece89cc0
11:59:48 AM: Building without cache
11:59:48 AM: Starting to prepare the repo for build
11:59:48 AM: No cached dependencies found. Cloning fresh repo

11:59:49 AM: Preparing Git Reference refs/heads/master
11:59:50 AM: Starting build script
11:59:50 AM: Installing dependencies
11:59:50 AM: Python version set to 2.7
11:59:51 AM: v12.18.0 is already installed.
11:59:52 AM: Now using node v12.18.0 (npm v6.14.4)
11:59:52 AM: Started restoring cached build plugins
11:59:52 AM: Finished restoring cached build plugins
11:59:52 AM: Attempting ruby version 2.7.1, read from the environment
11:59:53 AM: Using ruby version 2.7.1
11:59:54 AM: Using PHP version 5.6
11:59:54 AM: 5.2 is already installed.
11:59:54 AM: Using Swift version 5.2
11:59:54 AM: Started restoring cached node modules
11:59:54 AM: Finished restoring cached node modules
11:59:54 AM: Started restoring cached yarn cache
11:59:54 AM: Finished restoring cached yarn cache
11:59:54 AM: Installing yarn at version 1.22.4
11:59:54 AM: Installing Yarn!
11:59:54 AM: > Downloading tarball…

11:59:54 AM: % Total % Received % Xferd Average Speed Time Time Time Current
11:59:54 AM: Dload Upload Total Spent Left Speed
11:59:54 AM: 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
11:59:54 AM: 100 80 100 80 0 0 285 0 --:–:-- --:–:-- --:–:-- 285
11:59:54 AM: 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
11:59:54 AM: 100 93 100 93 0 0 156 0 --:–:-- --:–:-- --:–:-- 556
11:59:55 AM: 100 643 100 643 0 0 749 0 --:–:-- --:–:-- --:–:-- 749
11:59:55 AM: 100 1215k 100 1215k 0 0 947k 0 0:00:01 0:00:01 --:–:-- 947k
/tmp/yarn.tar.gz.aq7yGqZqlV.asc
11:59:55 AM: 100 84 100 84 0 0 3088 0 --:–:-- --:–:-- --:–:-- 3088
11:59:55 AM: 100 97 100 97 0 0 1692 0 --:–:-- --:–:-- --:–:-- 1692
11:59:55 AM: 100 647 100 647 0 0 7321 0 --:–:-- --:–:-- --:–:-- 7321
11:59:55 AM: 0 1028 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
11:59:55 AM: 100 1028 100 1028 0 0 8135 0 --:–:-- --:–:-- --:–:-- 1003k
11:59:55 AM: > Verifying integrity…
11:59:55 AM: gpg: Signature made Mon 09 Mar 2020 03:52:13 PM UTC using RSA key ID 69475BAA

11:59:55 AM: gpg: WARNING: This key is not certified with a trusted signature!
11:59:55 AM: gpg: There is no indication that the signature belongs to the owner.
11:59:55 AM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310
11:59:55 AM: Subkey fingerprint: 6D98 490C 6F1A CDDD 448E 4595 4F77 6793 6947 5BAA
11:59:55 AM: > GPG signature looks good
11:59:55 AM: > Extracting to ~/.yarn…
11:59:55 AM: > Adding to $PATH…
11:59:56 AM: > Successfully installed Yarn 1.22.4! Please open another terminal where the yarn command will now be available.
11:59:56 AM: Installing NPM modules using Yarn version 1.22.4
11:59:57 AM: yarn install v1.22.4
11:59:57 AM: [1/4] Resolving packages…
11:59:58 AM: [2/4] Fetching packages…
12:00:22 PM: info fsevents@2.1.2: The platform β€œlinux” is incompatible with this module.
12:00:22 PM: info β€œfsevents@2.1.2” is an optional dependency and failed compatibility check. Excluding it from installation.
12:00:22 PM: info fsevents@1.2.12: The platform β€œlinux” is incompatible with this module.
12:00:22 PM: info β€œfsevents@1.2.12” is an optional dependency and failed compatibility check. Excluding it from installation.
12:00:22 PM: [3/4] Linking dependencies…

= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
12:00:34 PM: [4/4] Building fresh packages…
12:00:36 PM: success Saved lockfile.
12:00:36 PM: Done in 38.98s.
12:00:36 PM: NPM modules installed using Yarn
12:00:36 PM: Started restoring cached go cache
12:00:36 PM: Finished restoring cached go cache
12:00:36 PM: go version go1.14.4 linux/amd64
12:00:36 PM: go version go1.14.4 Linux/amd64
12:00:36 PM: Installing missing commands
12:00:36 PM: Verify run directory
12:00:37 PM: ​
12:00:37 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
12:00:37 PM: β”‚ Netlify Build β”‚
12:00:37 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
12:00:37 PM: ​
12:00:37 PM: ❯ Version

12:00:37 PM: ​
12:00:37 PM: ❯ Flags
12:00:37 PM: deploy: 5f9069020af24e00933f58d3
12:00:37 PM: mode: buildbot
12:00:37 PM: ​
12:00:37 PM: ❯ Current directory
12:00:37 PM: /opt/build/repo
12:00:37 PM: ​
12:00:37 PM: ❯ Config file
12:00:37 PM: No config file was defined: using default values.
12:00:37 PM: ​
12:00:37 PM: ❯ Context
12:00:37 PM: production
12:00:37 PM: ​
12:00:37 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
12:00:37 PM: β”‚ 1. Build command from Netlify app β”‚
12:00:37 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
12:00:37 PM: ​
12:00:37 PM: $ yarn build
12:00:38 PM: yarn run v1.22.4
12:00:38 PM: $ react-scripts build
12:00:39 PM: Creating an optimized production build…
12:00:41 PM: Browserslist: caniuse-lite is outdated. Please run the following command: npx browserslist --update-db
12:00:42 PM: Failed to compile.
12:00:42 PM:
12:00:42 PM: ./src/index.js
12:00:42 PM: Cannot find file β€˜./app.js’ in β€˜./src’.
12:00:42 PM: error Command failed with exit code 1.
12:00:42 PM: ​
12:00:42 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
12:00:42 PM: β”‚ β€œbuild.command” failed β”‚
12:00:42 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
12:00:42 PM: ​
12:00:42 PM: Error message
12:00:42 PM: Command failed with exit code 1: yarn build
12:00:42 PM: ​
12:00:42 PM: Error location
12:00:42 PM: In Build command from Netlify app:
12:00:42 PM: yarn build
12:00:42 PM: ​
12:00:42 PM: Resolved config
12:00:42 PM: build:
12:00:42 PM: command: yarn build
12:00:42 PM: commandOrigin: ui
12:00:42 PM: publish: /opt/build/repo/build
12:00:42 PM: Caching artifacts
12:00:42 PM: Started saving node modules
12:00:42 PM: Finished saving node modules
12:00:42 PM: Started saving build plugins
12:00:42 PM: Finished saving build plugins
12:00:42 PM: Started saving yarn cache
12:00:42 PM: Finished saving yarn cache
12:00:42 PM: Started saving pip cache
12:00:42 PM: Finished saving pip cache
12:00:42 PM: Started saving emacs cask dependencies
12:00:42 PM: Finished saving emacs cask dependencies
12:00:42 PM: Started saving maven dependencies
12:00:42 PM: Finished saving maven dependencies
12:00:42 PM: Started saving boot dependencies
12:00:42 PM: Finished saving boot dependencies
12:00:42 PM: Started saving go dependencies
12:00:42 PM: Finished saving go dependencies
12:00:45 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
12:00:45 PM: Failing build: Failed to build site
12:00:45 PM: Failed during stage β€˜building site’: Build script returned non-zero exit code: 2
12:00:45 PM: Finished processing build request in 57.736891768s
Enjoyed And be safe from the scammers don’t share any sensitive information on that plateform.

hey folks,

Thanks so much for reaching out! @fatwalrus619, can you please share your build settings for us to check?

@kanyekim, can you please share a link to your site as well as your build settings?

Lastly, we are currently investigating delays in our self-serve build system which make be impacting builds right now. That being said, they would not have impacted your builds 6 hours ago, @fatwalrus619. For more information, you can follow along here: Netlify Status - Delay in our Self-Server Build system

Im not sure what you need for build settings.
here is the link to my project on github:

https://github.com/markolsen619/Walrus-Dao

Hey @fatwalrus619

It would appear this is the specific issue stopping your build from succeeding.