Hello Error "non-zero exit code: 1" I want to deploy my react frontend can anybody help?

Deploy failed for peaceful-sopapillas-cd5c07

12:12:13 PM: To address all issues (including breaking changes), run:
12:12:13 PM: npm audit fix --force
12:12:13 PM: Run npm audit for details.
12:12:13 PM: NPM modules installed
12:12:14 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
12:12:14 PM: npm WARN config location in the cache, and they are managed by
12:12:14 PM: npm WARN config cacache.
12:12:14 PM: Started restoring cached go cache
12:12:14 PM: Finished restoring cached go cache
12:12:14 PM: Installing Go version 1.17 (requested 1.17)
12:12:18 PM: unset GOOS;
12:12:18 PM: unset GOARCH;
12:12:18 PM: export GOROOT=β€˜/opt/buildhome/.gimme/versions/go1.17.linux.amd64’;
12:12:18 PM: export PATH=β€œ/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}”;
12:12:18 PM: go version >&2;
12:12:18 PM: export GIMME_ENV=β€œ/opt/buildhome/.gimme/env/go1.17.linux.amd64.env”
12:12:18 PM: go version go1.17 linux/amd64
12:12:18 PM: Installing missing commands
12:12:18 PM: Verify run directory
12:12:19 PM: ​
12:12:19 PM: ────────────────────────────────────────────────────────────────
12:12:19 PM: Netlify Build
12:12:19 PM: ────────────────────────────────────────────────────────────────
12:12:19 PM: ​
12:12:19 PM: ❯ Version
12:12:19 PM: @netlify/build 27.17.1
12:12:19 PM: ​
12:12:19 PM: ❯ Flags
12:12:19 PM: baseRelDir: true
12:12:19 PM: buildId: 63201118dc53d157ad1ba2bc
12:12:19 PM: deployId: 63201118dc53d157ad1ba2be
12:12:19 PM: ​
12:12:19 PM: ❯ Current directory
12:12:19 PM: /opt/build/repo
12:12:19 PM: ​
12:12:19 PM: ❯ Config file
12:12:19 PM: No config file was defined: using default values.
12:12:19 PM: ​
12:12:19 PM: ❯ Context
12:12:19 PM: production
12:12:19 PM: ​
12:12:19 PM: ────────────────────────────────────────────────────────────────
12:12:19 PM: 1. Build command from Netlify app
12:12:19 PM: ────────────────────────────────────────────────────────────────
12:12:19 PM: ​
12:12:19 PM: $ npm run build
12:12:19 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
12:12:19 PM: npm WARN config location in the cache, and they are managed by
12:12:19 PM: npm WARN config cacache.
12:12:19 PM: > client@0.1.0 build
12:12:19 PM: > react-scripts build
12:12:20 PM: Creating an optimized production build…
12:12:25 PM:
12:12:25 PM: Treating warnings as errors because process.env.CI = true.
12:12:25 PM: Most CI servers set it automatically.
12:12:25 PM:
12:12:25 PM: Failed to compile.
12:12:25 PM:
12:12:25 PM: [eslint]
12:12:25 PM: src/App.js
12:12:25 PM: Line 97:25: Expected β€˜!==’ and instead saw β€˜!=’ eqeqeq
12:12:25 PM: ​
12:12:25 PM: ────────────────────────────────────────────────────────────────
12:12:25 PM: β€œbuild.command” failed
12:12:25 PM: ────────────────────────────────────────────────────────────────
12:12:25 PM: ​
12:12:25 PM: Error message
12:12:25 PM: Command failed with exit code 1: npm run build
12:12:25 PM: ​
12:12:25 PM: Error location
12:12:25 PM: In Build command from Netlify app:
12:12:25 PM: npm run build
12:12:25 PM: ​
12:12:25 PM: Resolved config
12:12:25 PM: build:
12:12:25 PM: command: npm run build
12:12:25 PM: commandOrigin: ui
12:12:25 PM: publish: /opt/build/repo/build
12:12:25 PM: publishOrigin: ui
12:12:25 PM: Caching artifacts
12:12:25 PM: Started saving node modules
12:12:25 PM: Finished saving node modules
12:12:25 PM: Started saving build plugins
12:12:25 PM: Finished saving build plugins
12:12:25 PM: Started saving pip cache
12:12:25 PM: Finished saving pip cache
12:12:25 PM: Started saving emacs cask dependencies
12:12:25 PM: Finished saving emacs cask dependencies
12:12:25 PM: Started saving maven dependencies
12:12:25 PM: Finished saving maven dependencies
12:12:25 PM: Started saving boot dependencies
12:12:25 PM: Finished saving boot dependencies
12:12:25 PM: Started saving rust rustup cache
12:12:25 PM: Finished saving rust rustup cache
12:12:25 PM: Started saving go dependencies
12:12:25 PM: Finished saving go dependencies
12:12:26 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
12:12:26 PM: Creating deploy upload records
12:12:26 PM: Failing build: Failed to build site
12:12:26 PM: Failed during stage β€˜building site’: Build script returned non-zero exit code: 2
12:12:26 PM: Finished processing build request in 28.417070754s

Hi @Ieatcrayons

As the message above says, ESLint was expecting to see !==, but saw !=. Replace the latter with the former, and the build should succeed (assuming no other errors.)

1 Like

It works! Ty so mucHHHHHH !!!

Yahoo, glad everything works! Thanks for solving this, @coelmay