5:35 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1

I need advice to debug deploy Netlify App

below is my deploy Log Kindly help me i have looked for solution everywhere

6:07:08 PM: Build ready to start
6:07:10 PM: build-image version: 9d79ad851d6eff3969322d6e5b1df3d597650c41
6:07:10 PM: build-image tag: v3.3.19
6:07:10 PM: buildbot version: 8e2e5a3a5212190d0490c1372e313994f9085345
6:07:10 PM: Fetching cached dependencies
6:07:10 PM: Starting to download cache of 254.3KB
6:07:10 PM: Finished downloading cache in 81.156774ms
6:07:10 PM: Starting to extract cache
6:07:10 PM: Failed to fetch cache, continuing with build
6:07:10 PM: Starting to prepare the repo for build
6:07:10 PM: No cached dependencies found. Cloning fresh repo
6:07:10 PM: git clone https://github.com/afnan178/ReactJs-todolist
6:07:11 PM: Preparing Git Reference refs/heads/master
6:07:12 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: β€˜build’ versus β€˜build/’ in the Netlify UI
6:07:12 PM: Starting build script
6:07:12 PM: Installing dependencies
6:07:12 PM: Python version set to 2.7
6:07:13 PM: v12.18.0 is already installed.
6:07:14 PM: Now using node v12.18.0 (npm v6.14.4)
6:07:14 PM: Started restoring cached build plugins
6:07:14 PM: Finished restoring cached build plugins
6:07:14 PM: Attempting ruby version 2.7.1, read from environment
6:07:15 PM: Using ruby version 2.7.1
6:07:16 PM: Using PHP version 5.6
6:07:16 PM: 5.2 is already installed.
6:07:16 PM: Using Swift version 5.2
6:07:16 PM: Started restoring cached node modules
6:07:16 PM: Finished restoring cached node modules
6:07:16 PM: Installing NPM modules using NPM version 6.14.4
6:07:44 PM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
6:07:44 PM: > node -e β€œtry{require(β€˜./postinstall’)}catch(e){}”
6:07:45 PM: > core-js@3.6.5 postinstall /opt/build/repo/node_modules/core-js
6:07:45 PM: > node -e β€œtry{require(β€˜./postinstall’)}catch(e){}”
6:07:45 PM: > core-js-pure@3.6.5 postinstall /opt/build/repo/node_modules/core-js-pure
6:07:45 PM: > node -e β€œtry{require(β€˜./postinstall’)}catch(e){}”
6:07:47 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
6:07:47 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:07:47 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
6:07:47 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:07:47 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/jest-haste-map/node_modules/fsevents):
6:07:47 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:07:47 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
6:07:47 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:07:47 PM: added 1664 packages from 808 contributors and audited 1668 packages in 30.249s
6:07:48 PM: 59 packages are looking for funding
6:07:48 PM: run npm fund for details
6:07:48 PM: found 1 low severity vulnerability
6:07:48 PM: run npm audit fix to fix them, or npm audit for details
6:07:49 PM: NPM modules installed
6:07:49 PM: Started restoring cached go cache
6:07:49 PM: Finished restoring cached go cache
6:07:49 PM: go version go1.14.4 linux/amd64
6:07:49 PM: go version go1.14.4 linux/amd64
6:07:49 PM: Installing missing commands
6:07:49 PM: Verify run directory
6:07:50 PM: ​
6:07:50 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
6:07:50 PM: β”‚ Netlify Build β”‚
6:07:50 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
6:07:50 PM: ​
6:07:50 PM: ❯ Version
6:07:50 PM: @netlify/build 2.0.20
6:07:50 PM: ​
6:07:50 PM: ❯ Flags
6:07:50 PM: deployId: 5efb38fc93d749b8e6a9cb6d
6:07:50 PM: mode: buildbot
6:07:50 PM: ​
6:07:50 PM: ❯ Current directory
6:07:50 PM: /opt/build/repo
6:07:50 PM: ​
6:07:50 PM: ❯ Config file
6:07:50 PM: No config file was defined: using default values.
6:07:50 PM: ​
6:07:50 PM: ❯ Context
6:07:50 PM: production
6:07:50 PM: ​
6:07:50 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
6:07:50 PM: β”‚ 1. Build command from settings β”‚
6:07:50 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
6:07:50 PM: ​
6:07:50 PM: $ CI=npm run build
6:07:50 PM: bash: run: command not found
6:07:50 PM: ​
6:07:50 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
6:07:50 PM: β”‚ β€œbuild.command” failed β”‚
6:07:50 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
6:07:50 PM: ​
6:07:50 PM: Error message
6:07:50 PM: Command failed with exit code 127: CI=npm run build
6:07:50 PM: ​
6:07:50 PM: Error location
6:07:50 PM: In Build command from settings:
6:07:50 PM: CI=npm run build
6:07:50 PM: ​
6:07:50 PM: Resolved config
6:07:50 PM: build:
6:07:50 PM: command: CI=npm run build
6:07:50 PM: publish: /opt/build/repo/build
6:07:50 PM: Caching artifacts
6:07:50 PM: Started saving node modules
6:07:50 PM: Finished saving node modules
6:07:50 PM: Started saving build plugins
6:07:50 PM: Finished saving build plugins
6:07:50 PM: Started saving pip cache
6:07:50 PM: Finished saving pip cache
6:07:50 PM: Started saving emacs cask dependencies
6:07:50 PM: Finished saving emacs cask dependencies
6:07:50 PM: Started saving maven dependencies
6:07:50 PM: Finished saving maven dependencies
6:07:50 PM: Started saving boot dependencies
6:07:50 PM: Finished saving boot dependencies
6:07:50 PM: Started saving go dependencies
6:07:50 PM: Finished saving go dependencies
6:07:53 PM: Error running command: Build script returned non-zero exit code: 1
6:07:53 PM: Failing build: Failed to build site
6:07:53 PM: Failed during stage β€˜building site’: Build script returned non-zero exit code: 1
6:07:53 PM: Finished processing build request in 43.544271432s

Hi, @Afnan_1khan, there should be a space after CI=.

So this:

CI= npm run build 

Instead of this:

CI=npm run build

If that doesn’t resolve it, please let us know.

1 Like

Thank you so so much it worked am a newbie and i really apperciate it mate :slight_smile:

1 Like