Building production JavaScript and CSS bundles failed

Bumples team
https://app.netlify.com/sites/stoic-lovelace-ae20bf
The gatsby site is working fine on the 8000 I have done a build and no problems.
On this site it says that javascript and css bundles failed and and can’t locate files.
Build script returned non-zero exit code: 2 Is the problem between gatsby and netlify or node. Where do I go to fix this problem. thanks Jen
3:02:49 PM: Build ready to start

3:02:50 PM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68

3:02:50 PM: build-image tag: v3.6.1

3:02:50 PM: buildbot version: df42d44cc6a0381cf657a671baf049c03981bafe

3:02:50 PM: Fetching cached dependencies

3:02:50 PM: Failed to fetch cache, continuing with build

3:02:50 PM: Starting to prepare the repo for build

3:02:51 PM: No cached dependencies found. Cloning fresh repo

3:02:51 PM: git clone GitHub - bumples/lola10

3:02:52 PM: Preparing Git Reference refs/heads/master

3:02:53 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘public’ versus ‘public/’ in the Netlify UI

3:02:53 PM: Starting build script

3:02:53 PM: Installing dependencies

3:02:53 PM: Python version set to 2.7

3:02:55 PM: v12.18.0 is already installed.

3:02:55 PM: Now using node v12.18.0 (npm v6.14.4)

3:02:55 PM: Started restoring cached build plugins

3:02:55 PM: Finished restoring cached build plugins

3:02:55 PM: Attempting ruby version 2.7.1, read from environment

3:02:57 PM: Using ruby version 2.7.1

3:02:57 PM: Using PHP version 5.6

3:02:57 PM: Started restoring cached node modules

3:02:57 PM: Finished restoring cached node modules

3:02:57 PM: Installing NPM modules using NPM version 6.14.4

3:03:53 PM: npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I’ll try to do my best with it!

3:03:53 PM: > sharp@0.27.1 install /opt/build/repo/node_modules/sharp

3:03:53 PM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

3:03:55 PM: info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.5/libvips-8.10.5-linux-x64.tar.br

3:03:57 PM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js

3:03:57 PM: > node -e “try{require(’./postinstall’)}catch(e){}”

3:03:57 PM: > core-js@3.8.3 postinstall /opt/build/repo/node_modules/core-js

3:03:57 PM: > node -e “try{require(’./postinstall’)}catch(e){}”

3:03:58 PM: > core-js-pure@3.8.3 postinstall /opt/build/repo/node_modules/core-js-pure

3:03:58 PM: > node -e “try{require(’./postinstall’)}catch(e){}”

3:03:59 PM: > gatsby-telemetry@1.10.0 postinstall /opt/build/repo/node_modules/gatsby-telemetry

3:03:59 PM: > node src/postinstall.js || true

3:03:59 PM: > mozjpeg@7.0.0 postinstall /opt/build/repo/node_modules/mozjpeg

3:03:59 PM: > node lib/install.js

3:04:00 PM: :heavy_check_mark: mozjpeg pre-build test passed successfully

3:04:00 PM: > pngquant-bin@6.0.0 postinstall /opt/build/repo/node_modules/pngquant-bin

3:04:00 PM: > node lib/install.js

3:04:00 PM: :heavy_check_mark: pngquant pre-build test passed successfully

3:04:00 PM: > gatsby-cli@2.19.1 postinstall /opt/build/repo/node_modules/gatsby-cli

3:04:00 PM: > node scripts/postinstall.js

3:04:00 PM: > gatsby@2.32.3 postinstall /opt/build/repo/node_modules/gatsby

3:04:00 PM: > node scripts/postinstall.js

3:04:04 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):

3:04:04 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

3:04:04 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/chokidar/node_modules/fsevents):

3:04:04 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

3:04:04 PM: added 2631 packages from 2210 contributors and audited 2641 packages in 65.528s

3:04:06 PM: 193 packages are looking for funding

3:04:06 PM: run npm fund for details

3:04:06 PM: found 1 low severity vulnerability

3:04:06 PM: run npm audit fix to fix them, or npm audit for details

3:04:06 PM: NPM modules installed

3:04:06 PM: Started restoring cached go cache

3:04:07 PM: Finished restoring cached go cache

3:04:07 PM: go version go1.14.4 linux/amd64

3:04:07 PM: go version go1.14.4 linux/amd64

3:04:07 PM: Installing missing commands

3:04:07 PM: Verify run directory

3:04:08 PM: ​

3:04:08 PM: ────────────────────────────────────────────────────────────────

3:04:08 PM: Netlify Build

3:04:08 PM: ────────────────────────────────────────────────────────────────

3:04:08 PM: ​

3:04:08 PM: ❯ Version

3:04:08 PM: @netlify/build 9.1.3

3:04:08 PM: ​

3:04:08 PM: ❯ Flags

3:04:08 PM: deployId: 602ec7e8782905258a040cea

3:04:08 PM: mode: buildbot

3:04:08 PM: ​

3:04:08 PM: ❯ Current directory

3:04:08 PM: /opt/build/repo

3:04:08 PM: ​

3:04:08 PM: ❯ Config file

3:04:08 PM: No config file was defined: using default values.

3:04:08 PM: ​

3:04:08 PM: ❯ Context

3:04:08 PM: production

3:04:08 PM: ​

3:04:08 PM: ────────────────────────────────────────────────────────────────

3:04:08 PM: 1. Build command from Netlify app

3:04:08 PM: ────────────────────────────────────────────────────────────────

3:04:08 PM: ​

3:04:08 PM: $ npm run build

3:04:09 PM: > gatsby-starter-default@0.1.0 build

3:04:09 PM: > gatsby build

3:04:12 PM: success open and validate gatsby-configs - 0.053s

3:04:13 PM: success load plugins - 0.797s

3:04:13 PM: success onPreInit - 0.048s

3:04:13 PM: success delete html and css files from previous builds - 0.003s

3:04:13 PM: success initialize cache - 0.006s

3:04:13 PM: success copy gatsby files - 0.066s

3:04:13 PM: success Optional chaining available

3:04:13 PM: success Optional chaining available

3:04:13 PM: success Optional chaining available

3:04:13 PM: success Optional chaining available

3:04:13 PM: success onPreBootstrap - 0.024s

3:04:13 PM: success createSchemaCustomization - 0.006s

3:04:13 PM:

3:04:13 PM: gatsby-source-shopify/Bumples starting to fetch data from Shopify

3:04:13 PM:

3:04:13 PM: gatsby-source-shopify/Bumples fetched and processed Shop nodes: 234.610ms

3:04:13 PM:

3:04:13 PM: gatsby-source-shopify/Bumples fetched and processed ShopPolicy nodes: 236.439ms

3:04:13 PM:

3:04:13 PM: gatsby-source-shopify/Bumples fetched and processed Page nodes: 282.409ms

3:04:13 PM:

3:04:13 PM: gatsby-source-shopify/Bumples fetched and processed Blog nodes: 285.942ms

3:04:13 PM:

3:04:13 PM: gatsby-source-shopify/Bumples fetched and processed Article nodes: 297.921ms

3:04:14 PM:

3:04:14 PM: gatsby-source-shopify/Bumples fetched and processed Collection nodes: 458.693ms

3:04:14 PM: success Downloading remote files - 0.282s - 16/16 56.76/s

3:04:14 PM:

3:04:14 PM: gatsby-source-shopify/Bumples fetched and processed Product nodes: 494.442ms

3:04:14 PM:

3:04:14 PM: gatsby-source-shopify/Bumples finished fetching data from Shopify: 488.310ms

3:04:14 PM: success Checking for changed pages - 0.000s

3:04:14 PM: success source and transform nodes - 0.631s

3:04:14 PM: success building schema - 0.529s

3:04:14 PM: info Total nodes: 126, SitePage nodes: 12 (use --verbose for breakdown)

3:04:14 PM: success createPages - 0.045s

3:04:14 PM: success Checking for changed pages - 0.000s

3:04:14 PM: success createPagesStatefully - 0.077s

3:04:14 PM: success update schema - 0.049s

3:04:14 PM: success onPreExtractQueries - 0.001s

3:04:15 PM: success extract queries from components - 0.606s

3:04:15 PM: success write out redirect data - 0.001s

3:04:15 PM: warning The icon(src/images/Bumples.png) you provided to ‘gatsby-plugin-manifest’ is not square.

3:04:15 PM: The icons we generate will be square and for the best results we recommend you provide a square icon.

3:04:15 PM: success Build manifest and related icons - 0.215s

3:04:15 PM: success onPostBootstrap - 0.217s

3:04:15 PM: info bootstrap finished - 6.475s

3:04:18 PM: success run static queries - 2.831s - 3/3 1.06/s

3:04:19 PM: success run page queries - 0.512s - 17/17 33.21/s

3:04:19 PM: success write out requires - 0.003s

3:04:44 PM: failed Building production JavaScript and CSS bundles - 25.600s

3:04:44 PM: error Generating JavaScript bundles failed

3:04:44 PM: Can’t resolve ‘./src/context/CartContext’ in ‘/opt/build/repo’

3:04:44 PM: If you’re trying to use a package make sure that ‘./src/context/CartContext’ is installed. If you’re trying to use a local file make sure that the path is correct.

3:04:44 PM: error Generating JavaScript bundles failed

3:04:44 PM: Can’t resolve ‘./src/context/ProductContext’ in ‘/opt/build/repo’

3:04:44 PM: If you’re trying to use a package make sure that ‘./src/context/ProductContext’ is installed. If you’re trying to use a local file make sure that the path is correct.

3:04:44 PM: error Generating JavaScript bundles failed

3:04:44 PM: Can’t resolve ‘context/CartContext’ in ‘/opt/build/repo/src/components/Cart’

3:04:44 PM: If you’re trying to use a package make sure that ‘context/CartContext’ is installed. If you’re trying to use a local file make sure that the path is correct.

3:04:44 PM: error Generating JavaScript bundles failed

3:04:44 PM: Can’t resolve ‘context/CartContext’ in ‘/opt/build/repo/src/components/CartContents’

3:04:44 PM: If you’re trying to use a package make sure that ‘context/CartContext’ is installed. If you’re trying to use a local file make sure that the path is correct.

3:04:44 PM: error Generating JavaScript bundles failed

3:04:44 PM: Can’t resolve ‘context/CartContext’ in ‘/opt/build/repo/src/components/ProductQuantityAdder’

3:04:44 PM: If you’re trying to use a package make sure that ‘context/CartContext’ is installed. If you’re trying to use a local file make sure that the path is correct.

3:04:44 PM: error Generating JavaScript bundles failed

3:04:44 PM: Can’t resolve ‘context/CartContext’ in ‘/opt/build/repo/src/components/RemoveLineItem’

3:04:44 PM: If you’re trying to use a package make sure that ‘context/CartContext’ is installed. If you’re trying to use a local file make sure that the path is correct.

3:04:44 PM: error Generating JavaScript bundles failed

3:04:44 PM: Can’t resolve ‘context/CartContext’ in ‘/opt/build/repo/src/templates/ProductTemplate’

3:04:44 PM: If you’re trying to use a package make sure that ‘context/CartContext’ is installed. If you’re trying to use a local file make sure that the path is correct.

3:04:44 PM: error Generating JavaScript bundles failed

3:04:44 PM: Can’t resolve ‘context/ProductContext’ in ‘/opt/build/repo/src/components/FeaturedProducts’

3:04:44 PM: If you’re trying to use a package make sure that ‘context/ProductContext’ is installed. If you’re trying to use a local file make sure that the path is correct.

3:04:44 PM: error Generating JavaScript bundles failed

3:04:44 PM: Can’t resolve ‘context/ProductContext’ in ‘/opt/build/repo/src/components/Filters’

3:04:44 PM: If you’re trying to use a package make sure that ‘context/ProductContext’ is installed. If you’re trying to use a local file make sure that the path is correct.

3:04:44 PM: error Generating JavaScript bundles failed

3:04:44 PM: Can’t resolve ‘context/ProductContext’ in ‘/opt/build/repo/src/pages’

3:04:44 PM: If you’re trying to use a package make sure that ‘context/ProductContext’ is installed. If you’re trying to use a local file make sure that the path is correct.

3:04:44 PM: error Generating JavaScript bundles failed

3:04:44 PM: Can’t resolve ‘context/ProductContext’ in ‘/opt/build/repo/src/pages’

3:04:44 PM: If you’re trying to use a package make sure that ‘context/ProductContext’ is installed. If you’re trying to use a local file make sure that the path is correct.

3:04:44 PM: not finished Generating image thumbnails - 28.904s

3:04:44 PM: npm ERR! code 1

3:04:44 PM: npm ERR! path /opt/build/repo

3:04:44 PM: npm ERR! command failed

3:04:44 PM: npm ERR! command sh -c gatsby build

3:04:44 PM: npm ERR! A complete log of this run can be found in:

3:04:44 PM: npm ERR! /opt/buildhome/.npm/_logs/2021-02-18T20_04_44_799Z-debug.log

3:04:44 PM: ​

3:04:44 PM: ────────────────────────────────────────────────────────────────

3:04:44 PM: “build.command” failed

3:04:44 PM: ────────────────────────────────────────────────────────────────

3:04:44 PM: ​

3:04:44 PM: Error message

3:04:44 PM: Command failed with exit code 1: npm run build

3:04:44 PM: ​

3:04:44 PM: Error location

3:04:44 PM: In Build command from Netlify app:

3:04:44 PM: npm run build

3:04:44 PM: ​

3:04:44 PM: Resolved config

3:04:44 PM: build:

3:04:44 PM: command: npm run build

3:04:44 PM: commandOrigin: ui

3:04:44 PM: environment:

3:04:44 PM: - GATSBY_ACCESS_TOKEN

3:04:44 PM: - GATSBY_SHOP_NAME

3:04:44 PM: publish: /opt/build/repo/public

3:04:44 PM: Caching artifacts

3:04:44 PM: Started saving node modules

3:04:44 PM: Finished saving node modules

3:04:44 PM: Started saving build plugins

3:04:44 PM: Finished saving build plugins

3:04:44 PM: Started saving pip cache

3:04:45 PM: Finished saving pip cache

3:04:45 PM: Started saving emacs cask dependencies

3:04:45 PM: Finished saving emacs cask dependencies

3:04:45 PM: Started saving maven dependencies

3:04:45 PM: Finished saving maven dependencies

3:04:45 PM: Started saving boot dependencies

3:04:45 PM: Finished saving boot dependencies

3:04:45 PM: Started saving rust rustup cache

3:04:45 PM: Finished saving rust rustup cache

3:04:45 PM: Started saving go dependencies

3:04:45 PM: Finished saving go dependencies

3:04:47 PM: Build failed due to a user error: Build script returned non-zero exit code: 2

3:04:47 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2

3:04:47 PM: Failing build: Failed to build site

3:04:48 PM: Finished processing build request in 1m58.159324808s

hi there, so all of these errors above mean we can’t find your files.

Does this work locally?

Hiya, sorry you are having trouble with your build.

This Support Guide contains a ton of useful debugging tips that might help.

You will also want to rule out case as a potential problem.