Unable to build, build failing

Hi all, my. builds are failing, I don’t know why. I am using a custom domain for it.

failed during stage ‘building site’: Build script returned non-zero exit code: 1

Hiya, sorry you are having trouble with your build.

This Common Issue contains a ton of useful debugging tips that can likely help you solve your problem :slight_smile:

We also recommend trying to search the forums with the build error you encountered - it’s likely your question was already asked by someone else!

If you are still having problems, please provide as much information as you can on what you have already tried, your full build log, what your build settings are, your package.json, etc. Thanks!

I changed the DNS address from godaddy(where i got the domain) to netlify’s, and this is my first time of commiting chages after that, its still failing, the same error happened, kindly help out. I have done it repeatedly.

7:39:33 AM: Build ready to start

7:39:34 AM: build-image version: 2dbd444fcdce00cf06325060a8238d5ae3e86774

7:39:34 AM: build-image tag: v3.3.7

7:39:34 AM: buildbot version: e2864b9f6fb42f8598086b4caa617ac9e650a222

7:39:35 AM: Fetching cached dependencies

7:39:35 AM: Starting to download cache of 254.9KB

7:39:35 AM: Finished downloading cache in 63.321213ms

7:39:35 AM: Starting to extract cache

7:39:35 AM: Failed to fetch cache, continuing with build

7:39:35 AM: Starting to prepare the repo for build

7:39:35 AM: No cached dependencies found. Cloning fresh repo

7:39:35 AM: git clone https://github.com/akinsikuoluwafemi/portfolio-remake

7:39:36 AM: Preparing Git Reference refs/heads/master

7:39:37 AM: Starting build script

7:39:37 AM: Installing dependencies

7:39:38 AM: Downloading and installing node v10.20.1...

7:39:38 AM: Downloading https://nodejs.org/dist/v10.20.1/node-v10.20.1-linux-x64.tar.xz...

7:39:39 AM: #########################

7:39:39 AM: 34.8%

7:39:39 AM: ######################################################

7:39:39 AM: ################## 100.0%

7:39:39 AM: Computing checksum with sha256sum

7:39:39 AM: Checksums matched!

7:39:41 AM: Now using node v10.20.1 (npm v6.14.4)

7:39:41 AM: Attempting ruby version 2.6.2, read from environment

7:39:42 AM: Using ruby version 2.6.2

7:39:43 AM: Using PHP version 5.6

7:39:43 AM: Started restoring cached node modules

7:39:43 AM: Finished restoring cached node modules

7:39:43 AM: Installing NPM modules using NPM version 6.14.4

7:40:13 AM: > node-sass@4.13.1 install /opt/build/repo/node_modules/node-sass

7:40:13 AM: > node scripts/install.js

7:40:13 AM: Downloading binary from https://github.com/sass/node-sass/releases/download/v4.13.1/linux-x64-64_binding.node

7:40:14 AM: Download complete

7:40:14 AM: Binary saved to /opt/build/repo/node_modules/node-sass/vendor/linux-x64-64/binding.node

7:40:14 AM: Caching binary to /opt/buildhome/.npm/node-sass/4.13.1/linux-x64-64_binding.node

7:40:14 AM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js

7:40:14 AM: > node -e "try{require('./postinstall')}catch(e){}"

7:40:14 AM: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

7:40:14 AM: The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:

7:40:14 AM: > https://opencollective.com/core-js

7:40:14 AM: > https://www.patreon.com/zloirock

7:40:14 AM: Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

7:40:14 AM: > core-js@3.6.4 postinstall /opt/build/repo/node_modules/core-js

7:40:14 AM: > node -e "try{require('./postinstall')}catch(e){}"

7:40:15 AM: > core-js-pure@3.6.4 postinstall /opt/build/repo/node_modules/core-js-pure

7:40:15 AM: > node -e "try{require('./postinstall')}catch(e){}"

7:40:15 AM: > node-sass@4.13.1 postinstall /opt/build/repo/node_modules/node-sass

7:40:15 AM: > node scripts/build.js

7:40:15 AM: Binary found at /opt/build/repo/node_modules/node-sass/vendor/linux-x64-64/binding.node

7:40:15 AM: Testing binary

7:40:15 AM: Binary is fine

7:40:17 AM: npm

7:40:17 AM: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules/webpack-dev-server/node_modules/fsevents):

7:40:17 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

7:40:17 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules/watchpack/node_modules/fsevents):

7:40:17 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

7:40:17 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules/jest-haste-map/node_modules/fsevents):

7:40:17 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

7:40:17 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):

7:40:17 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

7:40:17 AM: added 1782 packages from 823 contributors and audited 932447 packages in 33.619s

7:40:19 AM: 63 packages are looking for funding

7:40:19 AM: run `npm fund` for details

7:40:19 AM: found 0 vulnerabilities

7:40:19 AM: NPM modules installed

7:40:19 AM: Started restoring cached go cache

7:40:20 AM: Finished restoring cached go cache

7:40:20 AM: unset GOOS;

7:40:20 AM: unset GOARCH;

7:40:20 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';

7:40:20 AM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";

7:40:20 AM: go version >&2;

7:40:20 AM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';

7:40:20 AM: go version go1.12 linux/amd64

7:40:20 AM: Installing missing commands

7:40:20 AM: Verify run directory

7:40:20 AM: Executing user command: npm run build

7:40:20 AM: > portfolio-remake@0.1.0 build /opt/build/repo

7:40:20 AM: > react-scripts build

7:40:21 AM: Creating an optimized production build...

7:40:27 AM: Failed to compile.

7:40:27 AM: ./src/components/Home.js

7:40:27 AM: Cannot find file './recentWorksInPortfolio' in './src/components'.

7:40:27 AM: npm

7:40:27 AM: ERR! code ELIFECYCLE

7:40:27 AM: npm ERR! errno 1

7:40:27 AM: npm

7:40:27 AM: ERR! portfolio-remake@0.1.0 build: `react-scripts build`

7:40:27 AM: npm ERR! Exit status 1

7:40:27 AM: npm

7:40:27 AM: ERR!

7:40:27 AM: npm ERR! Failed at the portfolio-remake@0.1.0 build script.

7:40:27 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

7:40:27 AM: npm

7:40:27 AM: ERR! A complete log of this run can be found in:

7:40:27 AM: npm ERR! /opt/buildhome/.npm/_logs/2020-04-24T06_40_27_104Z-debug.log

7:40:27 AM: Skipping functions preparation step: no functions directory set

7:40:27 AM: Caching artifacts

7:40:27 AM: Started saving node modules

7:40:27 AM: Finished saving node modules

7:40:27 AM: Started saving pip cache

7:40:27 AM: Finished saving pip cache

7:40:27 AM: Started saving emacs cask dependencies

7:40:27 AM: Finished saving emacs cask dependencies

7:40:27 AM: Started saving maven dependencies

7:40:27 AM: Finished saving maven dependencies

7:40:27 AM: Started saving boot dependencies

7:40:27 AM: Finished saving boot dependencies

7:40:27 AM: Started saving go dependencies

7:40:27 AM: Finished saving go dependencies

7:40:31 AM: Error running command: Build script returned non-zero exit code: 1

7:40:31 AM: Failing build: Failed to build site

7:40:31 AM: failed during stage 'building site': Build script returned non-zero exit code: 1

7:40:31 AM: Finished processing build request in 56.757874958s

This is my package.json

{
“name”: “portfolio-remake”,
“version”: “0.1.0”,
“private”: true,
“dependencies”: {
@formcarry/react”: “^1.0.2”,
@material-ui/core”: “^4.9.10”,
@material-ui/icons”: “^4.9.1”,
@material-ui/lab”: “^4.0.0-alpha.49”,
@testing-library/jest-dom”: “^4.2.4”,
@testing-library/react”: “^9.5.0”,
@testing-library/user-event”: “^7.2.1”,
“axios”: “^0.19.2”,
“node-sass”: “^4.13.1”,
“react”: “^16.13.1”,
“react-dom”: “^16.13.1”,
“react-router-dom”: “^5.1.2”,
“react-scripts”: “3.4.1”,
“react-scroll”: “^1.7.16”,
“react-spring”: “^8.0.27”
},
“scripts”: {
“start”: “react-scripts start”,
“build”: “react-scripts build”,
“test”: “react-scripts test”,
“eject”: “react-scripts eject”
},
“eslintConfig”: {
“extends”: “react-app”
},
“browserslist”: {
“production”: [
“>0.2%”,
“not dead”,
“not op_mini all”
],
“development”: [
“last 1 chrome version”,
“last 1 firefox version”,
“last 1 safari version”
]
}
}

Hi there, this isn’t a problem relating to build plugins specifically, correct? I’m going to move this post out of the build plugins category in that case.

The problem is undeniably this:

7:40:27 AM: Failed to compile.

7:40:27 AM: ./src/components/Home.js
7:40:27 AM: Cannot find file './recentWorksInPortfolio' in './src/components'.
7:40:27 AM: npm
7:40:27 AM: ERR! code ELIFECYCLE
7:40:27 AM: npm ERR! errno 1
7:40:27 AM: npm

the build can’t complete successffully as this file isn’t found.

Now, i can’t say why not, but if you fix this you will have a much better chance of things working.

Often these issues are related to path issues or case sensitivity, especially if the project builds locally:

Thanks, @perry I am having a look at it. Thanks once again. Regards

1 Like

let us know if you still can’t fix it :+1:

I have fixed it now, Thanks @perry, God bless you!!

1 Like

you’re welcome! glad its working :+1: