Failed during stage ‘building site’: Build script returned non-zero exit code: 1
Hey everyone am a newbie here and am having trouble during deployment of my site my website is working fine locally but i am having trouble deploying my site on netlify. I have already a site with same process but my 2nd website is failing during deployment, below is my build log please can anyone help me. Thank you
1:51:03 PM: Build ready to start
1:51:05 PM: build-image version: 9d79ad851d6eff3969322d6e5b1df3d597650c41
1:51:05 PM: build-image tag: v3.3.19
1:51:05 PM: buildbot version: 2cc7ea668a3e8f63326d15aab17e62cd1997fa2e
1:51:06 PM: Fetching cached dependencies
1:51:06 PM: Failed to fetch cache, continuing with build
1:51:06 PM: Starting to prepare the repo for build
1:51:06 PM: No cached dependencies found. Cloning fresh repo
1:51:06 PM: git clone https://github.com/afnan178/ReactJs-Calculator
1:51:07 PM: Preparing Git Reference refs/heads/master
1:51:08 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘build’ versus ‘build/’ in the Netlify UI
1:51:08 PM: Starting build script
1:51:08 PM: Installing dependencies
1:51:08 PM: Python version set to 2.7
1:51:10 PM: v12.18.0 is already installed.
1:51:10 PM: Now using node v12.18.0 (npm v6.14.4)
1:51:10 PM: Started restoring cached build plugins
1:51:10 PM: Finished restoring cached build plugins
1:51:10 PM: Attempting ruby version 2.7.1, read from environment
1:51:12 PM: Using ruby version 2.7.1
1:51:12 PM: Using PHP version 5.6
1:51:12 PM: 5.2 is already installed.
1:51:12 PM: Using Swift version 5.2
1:51:12 PM: Started restoring cached go cache
1:51:12 PM: Finished restoring cached go cache
1:51:12 PM: go version go1.14.4 linux/amd64
1:51:12 PM: go version go1.14.4 linux/amd64
1:51:12 PM: Installing missing commands
1:51:12 PM: Verify run directory
1:51:13 PM:
1:51:13 PM: ┌─────────────────────────────┐
1:51:13 PM: │ Netlify Build │
1:51:13 PM: └─────────────────────────────┘
1:51:13 PM:
1:51:13 PM: ❯ Version
1:51:13 PM: @netlify/build 2.0.25
1:51:13 PM:
1:51:13 PM: ❯ Flags
1:51:13 PM: deployId: 5efd9ff749266f825f105773
1:51:13 PM: mode: buildbot
1:51:13 PM:
1:51:13 PM: ❯ Current directory
1:51:13 PM: /opt/build/repo
1:51:13 PM:
1:51:13 PM: ❯ Config file
1:51:13 PM: No config file was defined: using default values.
1:51:13 PM:
1:51:13 PM: ❯ Context
1:51:13 PM: production
1:51:13 PM:
1:51:13 PM: ┌───────────────────────────────────┐
1:51:13 PM: │ 1. Build command from Netlify app │
1:51:13 PM: └───────────────────────────────────┘
1:51:13 PM:
1:51:13 PM: $ CI= npm run build
1:51:14 PM: npm ERR! code ENOENT
1:51:14 PM: npm ERR! syscall open
1:51:14 PM: npm ERR! path /opt/build/repo/package.json
1:51:14 PM: npm ERR! errno -2
1:51:14 PM: npm ERR! enoent ENOENT: no such file or directory, open ‘/opt/build/repo/package.json’
1:51:14 PM: npm ERR! enoent This is related to npm not being able to find a file.
1:51:14 PM: npm ERR! enoent
1:51:14 PM: npm ERR! A complete log of this run can be found in:
1:51:14 PM: npm ERR! /opt/buildhome/.npm/_logs/2020-07-02T08_51_14_095Z-debug.log
1:51:14 PM:
1:51:14 PM: ┌─────────────────────────────┐
1:51:14 PM: │ “build.command” failed │
1:51:14 PM: └─────────────────────────────┘
1:51:14 PM:
1:51:14 PM: Error message
1:51:14 PM: Command failed with exit code 254: CI= npm run build
1:51:14 PM:
1:51:14 PM: Error location
1:51:14 PM: In Build command from Netlify app:
1:51:14 PM: CI= npm run build
1:51:14 PM:
1:51:14 PM: Resolved config
1:51:14 PM: build:
1:51:14 PM: command: CI= npm run build
1:51:14 PM: commandOrigin: ui
1:51:14 PM: publish: /opt/build/repo/build
1:51:14 PM: Caching artifacts
1:51:14 PM: Started saving build plugins
1:51:14 PM: Finished saving build plugins
1:51:14 PM: Started saving pip cache
1:51:14 PM: Finished saving pip cache
1:51:14 PM: Started saving emacs cask dependencies
1:51:14 PM: Finished saving emacs cask dependencies
1:51:14 PM: Started saving maven dependencies
1:51:14 PM: Finished saving maven dependencies
1:51:14 PM: Started saving boot dependencies
1:51:14 PM: Finished saving boot dependencies
1:51:14 PM: Started saving go dependencies
1:51:14 PM: Finished saving go dependencies
1:51:17 PM: Error running command: Build script returned non-zero exit code: 1
1:51:17 PM: Failing build: Failed to build site
1:51:17 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1
1:51:17 PM: Finished processing build request in 11.330452477s