Error while building site

Good day,

My site at https://chibuikenwa.com just recently stopped building, it fails. I worked 2 months ago but has recently started failing. Find the build error below.

7:36:14 PM: Build ready to start
7:36:15 PM: build-image version: 6dfe19d15f524c85d6f9bf7df9fb30b0a9f0a61a
7:36:15 PM: build-image tag: v3.3.10
7:36:15 PM: buildbot version: 0d19834c19ebfe54208907d729718495339fe085
7:36:16 PM: Fetching cached dependencies
7:36:16 PM: Failed to fetch cache, continuing with build
7:36:16 PM: Starting to prepare the repo for build
7:36:17 PM: No cached dependencies found. Cloning fresh repo
7:36:17 PM: git clone https://github.com/chyke007/gatsby-portfolio
7:36:18 PM: Preparing Git Reference pull/79/head
7:36:19 PM: Found Netlify configuration file netlify.toml in site root
7:36:19 PM: Found Netlify configuration file(s). Overriding site configuration
7:36:19 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘public’ versus ‘public/’ in the Netlify UI
7:36:19 PM: Different build command detected, going to use the one specified in the Netlify configuration file: ‘npm run build’ versus ‘gatsby build’ in the Netlify UI
7:36:19 PM: Different functions path detected, going to use the one specified in the Netlify configuration file: ‘build’ versus ‘’ in the Netlify UI
7:36:19 PM: Creating functions prep folder
7:36:19 PM: Starting build script
7:36:19 PM: Installing dependencies
7:36:20 PM: v10.20.1 is already installed.
7:36:20 PM: Now using node v10.20.1 (npm v6.14.4)
7:36:21 PM: Attempting ruby version 2.6.2, read from environment
7:36:22 PM: Using ruby version 2.6.2
7:36:22 PM: Using PHP version 5.6
7:36:22 PM: 5.2 is already installed.
7:36:22 PM: Using Swift version 5.2
7:36:22 PM: Started restoring cached node modules
7:36:22 PM: Finished restoring cached node modules
7:36:22 PM: Started restoring cached yarn cache
7:36:22 PM: Finished restoring cached yarn cache
7:36:22 PM: Installing yarn at version 1.17.0
7:36:22 PM: Installing Yarn!
7:36:22 PM: > Downloading tarball…
7:36:22 PM: [1/2]: https://yarnpkg.com/downloads/1.17.0/yarn-v1.17.0.tar.gz --> /tmp/yarn.tar.gz.l5lT1Zjdem
7:36:22 PM: % Total %
7:36:22 PM: Received % Xferd Average Speed Time Time Time Current
7:36:22 PM: Dload Upload Total
7:36:22 PM: Spent Left Speed
7:36:22 PM:
0
7:36:22 PM: 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
7:36:22 PM:
100 80 100 80 0 0
7:36:22 PM: 282 0 --:–:-- --:–:-- --:–:-- 283
7:36:23 PM:
0 0 0 0 0 0 0 0 --:–:
7:36:23 PM: – --:–:-- --:–:-- 0
7:36:23 PM:
100 93 100 93 0 0
7:36:23 PM: 155 0 --:–:-- --:–:-- --:–:-- 367
7:36:23 PM:
100 630 100 630 0 0 73
7:36:23 PM: 3 0 --:–:-- --:–:-- --:–:-- 733
7:36:23 PM:
100 1213k 100 1213k 0 0 94
7:36:23 PM: 8k 0 0:00:01 0:00:01 --:–:-- 948k
7:36:23 PM: [2/2]: htt
7:36:23 PM: ps://yarnpkg.com/downloads/1
7:36:23 PM: .17.0/yarn-v1.17.0.tar.gz.asc -
7:36:23 PM: -> /tmp/yarn.tar.gz.
7:36:23 PM: l5lT1Zjdem.asc
7:36:23 PM:
100 84 1
7:36:23 PM: 00 84 0 0 3063 0 --:–:-- --:–:-- --:–:-- 3063
7:36:24 PM:
0 97 0 0 0 0
7:36:24 PM: 0 0 --:–:-- --:–:-- --:–:-- 0
7:36:24 PM:
100 97 100 97
7:36:24 PM: 0 0 1774 0
7:36:24 PM: --:–:-- --:–:-- --:–:-- 9
7:36:24 PM: 7000
7:36:24 PM:
100 634 100 634
7:36:24 PM: 0 0 7306 0 --:–:-- --:–:-- --:–:-- 7306
7:36:24 PM:
100 832 100 832 0 0 6655 0
7:36:24 PM: --:–:-- --:–:-- --:–:-- 6655
7:36:24 PM: > Verifying integrity…
7:36:24 PM: gpg:
7:36:24 PM: Signature made Fri 14 Jun 2019 06:55:58 PM UTC using RSA key ID 69475BAA
7:36:24 PM: gpg: Good signature from “Yarn Packaging yarn@dan.cx
7:36:24 PM: gpg: WARNING: This key is not certified with a trusted signature!
7:36:24 PM: gpg: There is no indication that the signature belongs to the owner.
7:36:24 PM: Primary key fingerprint: 72EC F46A 56B4 AD39
7:36:24 PM: C907 BBB7 1646 B01B 86E5 0310
7:36:24 PM: Subkey fingerprint: 6D98 490C 6F1A CDDD 448E 4595 4F77 6793 6947 5BAA
7:36:24 PM: > GPG signature looks good
7:36:24 PM: > Extracting to ~/.yarn…
7:36:24 PM: > Adding to $PATH…
7:36:24 PM: > Successfully installed Yarn 1.17.0! Please open another terminal where the yarn command will now be available.
7:36:25 PM: Installing NPM modules using Yarn version 1.17.0
7:36:25 PM: yarn install v1.17.0
7:36:26 PM: [1/4] Resolving packages…
7:36:26 PM: warning Resolution field “sharp@0.24.0” is incompatible with requested version “sharp@^0.25.1”
7:36:27 PM: warning Resolution field “sharp@0.24.0” is incompatible with requested version “sharp@^0.23.3”
7:36:29 PM: warning gatsby-remark-relative-images > babel-polyfill > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
7:36:30 PM: warning gatsby-transformer-remark > remark > unified > @types/vfile > @types/vfile-message@2.0.0: This is a stub types definition. vfile-message provides its own type definitions, so you do not need this installed.
7:36:30 PM: warning Resolution field “sharp@0.24.0” is incompatible with requested version “sharp@^0.23.3”
7:36:30 PM: warning netlify-cms-app > netlify-cms-core > react-router-redux@5.0.0-alpha.9: This project is no longer maintained.
7:36:31 PM: warning netlify-cms-app > netlify-cms-widget-markdown > slate-react > memoize-one@4.1.0: New custom equality api does not play well with all equality helpers. Please use v5.x
7:36:31 PM: warning node-sass > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
7:36:31 PM: warning node-sass > node-gyp > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
7:36:32 PM: [2/4] Fetching packages…
7:37:01 PM: info fsevents@2.1.2: The platform “linux” is incompatible with this module.
7:37:01 PM: info “fsevents@2.1.2” is an optional dependency and failed compatibility check. Excluding it from installation.
7:37:01 PM: info fsevents@1.2.11: The platform “linux” is incompatible with this module.
7:37:01 PM: info “fsevents@1.2.11” is an optional dependency and failed compatibility check. Excluding it from installation.
7:37:01 PM: info fsevents@2.1.3: The platform “linux” is incompatible with this module.
7:37:01 PM: info “fsevents@2.1.3” is an optional dependency and failed compatibility check. Excluding it from installation.
7:37:01 PM: [3/4] Linking dependencies…
7:37:01 PM: warning “gatsby > react-hot-loader@4.12.18” has unmet peer dependency “@types/react@^15.0.0 || ^16.0.0”.
7:37:01 PM: warning “gatsby > @typescript-eslint/eslint-plugin > tsutils@3.17.1” has unmet peer dependency “typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta”.
7:37:01 PM: warning “gatsby > gatsby-cli > ink@2.6.0” has unmet peer dependency “@types/react@>=16.8.0”.
7:37:01 PM: warning “gatsby-plugin-sass > sass-loader@7.3.1” has unmet peer dependency “webpack@^3.0.0 || ^4.0.0”.
7:37:01 PM: warning “netlify-cms-app > netlify-cms-widget-code@1.1.4” has unmet peer dependency “codemirror@^5.46.0”.
7:37:01 PM: warning “netlify-cms-app > netlify-cms-widget-relation@2.6.0” has unmet peer dependency “netlify-cms-lib-widgets@^1.0.0”.
7:37:01 PM: warning “netlify-cms-app > netlify-cms-core > redux-notifications > react-redux@4.4.10” has incorrect peer dependency “redux@^2.0.0 || ^3.0.0”.
7:37:01 PM: warning “netlify-cms-app > netlify-cms-widget-code > react-codemirror2@6.0.1” has unmet peer dependency “codemirror@5.x”.
7:37:39 PM: [4/4] Building fresh packages…
7:37:50 PM: success Saved lockfile.
7:37:50 PM: Done in 84.37s.
7:37:50 PM: NPM modules installed using Yarn
7:37:50 PM: Started restoring cached go cache
7:37:50 PM: Finished restoring cached go cache
7:37:50 PM: go version go1.12 linux/amd64
7:37:50 PM: go version go1.12 linux/amd64
7:37:50 PM: Installing missing commands
7:37:50 PM: Verify run directory
7:37:50 PM: Executing user command: npm run build
7:37:50 PM: > gatsby-starter-default@0.1.0 build /opt/build/repo
7:37:50 PM: > gatsby build
7:37:53 PM: success open and validate gatsby-configs - 0.030s
7:37:54 PM: success load plugins - 1.486s
7:37:54 PM: success onPreInit - 0.008s
7:37:54 PM: success delete html and css files from previous builds - 0.011s
7:37:54 PM: success initialize cache - 0.009s
7:37:54 PM: success copy gatsby files - 0.026s
7:37:54 PM: success onPreBootstrap - 0.003s
7:37:54 PM: success createSchemaCustomization - 0.025s
7:37:55 PM: success source and transform nodes - 0.314s
7:37:55 PM: success building schema - 0.462s
7:37:55 PM: success createPages - 0.042s
7:37:55 PM: success createPagesStatefully - 0.109s
7:37:55 PM: success onPreExtractQueries - 0.000s
7:37:55 PM: success update schema - 0.028s
7:37:56 PM: success extract queries from components - 0.435s
7:37:56 PM: success write out requires - 0.004s
7:37:56 PM: success write out redirect data - 0.001s
7:37:56 PM: success Build manifest and related icons - 0.184s
7:37:56 PM: success onPostBootstrap - 0.186s
7:37:56 PM: ⠀
7:37:56 PM: info bootstrap finished - 5.362 s
7:37:56 PM: ⠀
7:37:56 PM: warning Browserslist: caniuse-lite is outdated. Please run next command yarn upgrade
7:37:57 PM: success Generating image thumbnails - 1.167s - 3/3 2.57/s
7:38:33 PM: failed Building production JavaScript and CSS bundles - 36.893s
7:38:33 PM: error Generating JavaScript bundles failed
7:38:33 PM: Can’t resolve ‘caches/gatsby-plugin-offline/app-shell.js’ in ‘/opt/build/repo/.cache’
7:38:33 PM: not finished run queries - 36.959s
7:38:33 PM: npm
7:38:33 PM: ERR! code ELIFECYCLE
7:38:33 PM: npm
7:38:33 PM: ERR! errno 1
7:38:33 PM: npm ERR!
7:38:33 PM: gatsby-starter-default@0.1.0 build: gatsby build
7:38:33 PM: npm ERR! Exit status 1
7:38:33 PM: npm ERR!
7:38:33 PM: npm ERR! Failed at the gatsby-starter-default@0.1.0 build script.
7:38:33 PM: npm ERR!
7:38:33 PM: This is probably not a problem with npm. There is likely additional logging output above.
7:38:33 PM: npm
7:38:33 PM: ERR! A complete log of this run can be found in:
7:38:33 PM: npm ERR!
7:38:33 PM: /opt/buildhome/.npm/_logs/2020-05-17T18_38_33_436Z-debug.log
7:38:33 PM: Function Dir: /opt/build/repo/build
7:38:33 PM: TempDir: /tmp/zisi-5ec1841ea787cb0007e40dce
7:38:33 PM: Prepping functions with zip-it-and-ship-it 0.3.1
7:38:34 PM: [ { path: ‘/tmp/zisi-5ec1841ea787cb0007e40dce/hello.zip’,
7:38:34 PM: runtime: ‘js’ },
7:38:34 PM: { path: ‘/tmp/zisi-5ec1841ea787cb0007e40dce/subscribe.zip’,
7:38:34 PM: runtime: ‘js’ } ]
7:38:34 PM: Prepping functions complete
7:38:34 PM: Caching artifacts
7:38:34 PM: Started saving node modules
7:38:34 PM: Finished saving node modules
7:38:34 PM: Started saving yarn cache
7:38:34 PM: Finished saving yarn cache
7:38:34 PM: Started saving pip cache
7:38:34 PM: Finished saving pip cache
7:38:34 PM: Started saving emacs cask dependencies
7:38:34 PM: Finished saving emacs cask dependencies
7:38:34 PM: Started saving maven dependencies
7:38:34 PM: Finished saving maven dependencies
7:38:34 PM: Started saving boot dependencies
7:38:34 PM: Finished saving boot dependencies
7:38:34 PM: Started saving go dependencies
7:38:34 PM: Finished saving go dependencies
7:38:38 PM: Error running command: Build script returned non-zero exit code: 1
7:38:38 PM: Failing build: Failed to build site
7:38:38 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1
7:38:38 PM: Finished processing build request in 2m22.783003768s

hey there,

it seems like you are asking us to run a build command that isn’t defined in your package.json:

7:38:33 PM: npm ERR! Exit status 1
7:38:33 PM: npm ERR!
7:38:33 PM: npm ERR! Failed at the gatsby-starter-default@0.1.0 build script.
7:38:33 PM: npm ERR!

I would make sure that the project builds locally before pushing it.

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

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

Thanks, local build works. I had to comment out the gatsby-plugin-offline in my gatsby config file to get it to work.

Like I said earlier nothing changed in my package.json.

Thanks.

ugh. gatsby-plugin-offline! that can cause a lot of problems - if you run a quick search, you’ll see multiple people with the same issues :expressionless: glad it its working now.