Deploying website for continuous deployment works fine, when i update via contentful something with the cache breaks it

I can deploy my site using continuous deployment fine and i have it connected via webhook to contentful to re-deploy whenever some content is added but every single time it breaks and tells me a file is not found within a cache file that i can’t seem to find… here is the github GitHub - CSAtkinson/WishLouder at WishLouder


 2:23:37 PM: Build ready to start
2:23:39 PM: build-image version: c5b01a919d3e16af69445c5de0cacb49efbb1a23 (focal)
2:23:39 PM: build-image tag: v4.4.0
2:23:39 PM: buildbot version: 310b97c0b492c65b9769b8d18cf78092f76fc2fe
2:23:39 PM: Fetching cached dependencies
2:23:39 PM: Starting to download cache of 342.0MB
2:23:43 PM: Finished downloading cache in 3.449429259s
2:23:43 PM: Starting to extract cache
2:23:54 PM: Finished extracting cache in 11.734488324s
2:23:54 PM: Finished fetching cache in 15.284965852s
2:23:54 PM: Starting to prepare the repo for build
2:23:55 PM: Preparing Git Reference refs/heads/WishLouder
2:23:55 PM: Parsing package.json dependencies
2:23:56 PM: Starting build script
2:23:56 PM: Installing dependencies
2:23:56 PM: Python version set to 2.7
2:23:56 PM: Started restoring cached node version
2:23:58 PM: Finished restoring cached node version
2:23:59 PM: v16.13.0 is already installed.
2:23:59 PM: Now using node v16.13.0 (npm v8.1.0)
2:23:59 PM: Started restoring cached build plugins
2:23:59 PM: Finished restoring cached build plugins
2:23:59 PM: Attempting ruby version 2.7.2, read from environment
2:24:01 PM: Using ruby version 2.7.2
2:24:01 PM: Using PHP version 8.0
2:24:01 PM: Started restoring cached node modules
2:24:01 PM: Finished restoring cached node modules
2:24:01 PM: Started restoring cached go cache
2:24:01 PM: Finished restoring cached go cache
2:24:01 PM: go version go1.16.5 linux/amd64
2:24:01 PM: go version go1.16.5 linux/amd64
2:24:01 PM: Installing missing commands
2:24:01 PM: Verify run directory
2:24:03 PM: ​
2:24:03 PM: ────────────────────────────────────────────────────────────────
2:24:03 PM:   Netlify Build                                                 
2:24:03 PM: ────────────────────────────────────────────────────────────────
2:24:03 PM: ​
2:24:03 PM: ❯ Version
2:24:03 PM:   @netlify/build 18.21.2
2:24:03 PM: ​
2:24:03 PM: ❯ Flags
2:24:03 PM:   baseRelDir: true
2:24:03 PM:   buildId: 6182d3a964ff466a64b1565a
2:24:03 PM:   deployId: 6182d3a964ff466a64b1565c
2:24:03 PM: ​
2:24:03 PM: ❯ Current directory
2:24:03 PM:   /opt/build/repo
2:24:03 PM: ​
2:24:03 PM: ❯ Config file
2:24:03 PM:   No config file was defined: using default values.
2:24:03 PM: ​
2:24:03 PM: ❯ Context
2:24:03 PM:   production
2:24:03 PM: ​
2:24:03 PM: ❯ Loading plugins
2:24:03 PM:    - @netlify/plugin-gatsby@1.0.3 from Netlify app
2:24:04 PM: ​
2:24:04 PM: ────────────────────────────────────────────────────────────────
2:24:04 PM:   1. @netlify/plugin-gatsby (onPreBuild event)                  
2:24:04 PM: ────────────────────────────────────────────────────────────────
2:24:04 PM: ​
2:24:05 PM: Found a Gatsby cache. We’re about to go FAST. ⚡️
2:24:05 PM: Add `gatsby-plugin-netlify` to `gatsby-config.js` if you would like to support Gatsby redirects. 🎉
2:24:05 PM: ​
2:24:05 PM: (@netlify/plugin-gatsby onPreBuild completed in 868ms)
2:24:05 PM: ​
2:24:05 PM: ────────────────────────────────────────────────────────────────
2:24:05 PM:   2. Build command from Netlify app                             
2:24:05 PM: ────────────────────────────────────────────────────────────────
2:24:05 PM: ​
2:24:05 PM: $ npm run build
2:24:05 PM: > wish-louder.com@1.0.0 build
2:24:05 PM: > gatsby build
2:24:08 PM: info Some features you configured with flags are used natively now.
2:24:08 PM: Those flags no longer have any effect and you can remove them from config:
2:24:08 PM: - PARALLEL_QUERY_RUNNING · EXPERIMENTAL · (Umbrella Issue (https://gatsby.dev/pqr-feedback)) · Parallelize running page queries in order to better saturate all available cores. Improves time it takes to run queries during gatsby build. Requires Node v14.10 or above.
2:24:08 PM: There are 2 other flags available that you might be interested in:
2:24:08 PM: - PRESERVE_FILE_DOWNLOAD_CACHE · (Umbrella Issue (https://gatsby.dev/cache-clearing-feedback)) · Don't delete the downloaded files cache when changing gatsby-node.js & gatsby-config.js files.
2:24:08 PM: - PARALLEL_SOURCING · EXPERIMENTAL · (Umbrella Issue (https://gatsby.dev/parallel-sourcing-feedback)) · Run all source plugins at the same time instead of serially. For sites with multiple source plugins, this can speedup sourcing and transforming considerably.
2:24:09 PM: warning Plugin gatsby-plugin-webfonts is not compatible with your gatsby version 4.0.0 - It requires gatsby@^3.0.0
2:24:09 PM: warning Plugin gatsby-plugin-webfonts is not compatible with your gatsby version 4.0.0 - It requires gatsby@^3.0.0
2:24:09 PM: success open and validate gatsby-configs, load plugins - 1.214s
2:24:09 PM: success onPreInit - 0.014s
2:24:09 PM: success delete worker cache from previous builds - 0.002s
2:24:09 PM: success initialize cache - 0.051s
2:24:09 PM: success copy gatsby files - 0.164s
2:24:10 PM: success Compiling Gatsby Functions - 0.384s
2:24:10 PM: success onPreBootstrap - 0.483s
2:24:10 PM: success createSchemaCustomization - 0.583s
2:24:11 PM: success Contentful: Sync changed items - 0.121s - 1/1 8.29/s
2:24:11 PM: info Contentful: 1 new/updated entries
2:24:11 PM: info Contentful: 0 deleted entries
2:24:11 PM: info Contentful: 4 cached entries
2:24:11 PM: info Contentful: 0 new/updated assets
2:24:11 PM: info Contentful: 9 cached assets
2:24:11 PM: info Contentful: 0 deleted assets
2:24:11 PM: success Contentful: Fetch data (xl3cf4swv9m8-master) - 0.478s
2:24:11 PM: info Creating 5 Contentful Meme nodes
2:24:11 PM: info Creating 9 Contentful asset nodes
2:24:11 PM: success Contentful: Create nodes (xl3cf4swv9m8-master) - 0.030s
2:24:11 PM: success Contentful: Process data (xl3cf4swv9m8-master) - 0.052s
2:24:11 PM: success Checking for changed pages - 0.000s
2:24:11 PM: success source and transform nodes - 1.136s
2:24:12 PM: info Writing GraphQL type definitions to /opt/build/repo/.cache/schema.gql
2:24:14 PM: success building schema - 2.891s
2:24:14 PM: success createPages - 0.000s
2:24:15 PM: success createPagesStatefully - 0.364s
2:24:15 PM: info Total nodes: 70, SitePage nodes: 7 (use --verbose for breakdown)
2:24:15 PM: success Checking for changed pages - 0.000s
2:24:15 PM: success Cleaning up stale page-data - 0.002s
2:24:15 PM: success onPreExtractQueries - 0.000s
2:24:15 PM: error (node:1250) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /opt/build/repo/node_modules/postcss-js/package.json.
2:24:15 PM: Update this package.json to use a subpath pattern like "./*".
2:24:15 PM: (Use `node --trace-deprecation ...` to show where the warning was created)
2:24:22 PM: success extract queries from components - 7.191s
2:24:22 PM: success write out redirect data - 0.001s
2:24:22 PM: success onPostBootstrap - 0.001s
2:24:22 PM: info bootstrap finished - 16.811s
2:24:22 PM: success write out requires - 0.007s
2:24:24 PM: success Building production JavaScript and CSS bundles - 1.860s
2:24:25 PM: success Building HTML renderer - 0.730s
2:24:25 PM: success Caching Webpack compilations - 0.001s
2:24:25 PM: error ENOENT: no such file or directory, open '/opt/build/repo/.cache/caches/gatsby-source-contentful/662c7a56aac3310994d8b39c1f676a2b-3/ogre.jpg'
2:24:25 PM: 
2:24:25 PM: 
2:24:25 PM:   Error: ENOENT: no such file or directory, open '/opt/build/repo/.cache/caches/  gatsby-source-contentful/662c7a56aac3310994d8b39c1f676a2b-3/ogre.jpg'
2:24:25 PM: 
2:24:25 PM: error An error occurred during parallel query running.
2:24:25 PM: Go here for troubleshooting tips: https://gatsby.dev/pqr-feedback
2:24:25 PM: 
2:24:25 PM: 
2:24:25 PM:   Error: Worker exited before finishing task
2:24:25 PM:   
2:24:25 PM:   - index.js:112 ChildProcess.<anonymous>
2:24:25 PM:     [repo]/[gatsby-worker]/dist/index.js:112:45
2:24:25 PM:   
2:24:25 PM:   - node:events:390 ChildProcess.emit
2:24:25 PM:     node:events:390:28
2:24:25 PM:   
2:24:25 PM:   - child_process:290 Process.ChildProcess._handle.onexit
2:24:25 PM:     node:internal/child_process:290:12
2:24:25 PM:   
2:24:25 PM: 
2:24:25 PM: not finished run queries in workers - 0.343s
2:24:25 PM: ​
2:24:25 PM: ────────────────────────────────────────────────────────────────
2:24:25 PM:   "build.command" failed                                        
2:24:25 PM: ────────────────────────────────────────────────────────────────
2:24:25 PM: ​
2:24:25 PM:   Error message
2:24:25 PM:   Command failed with exit code 1: npm run build
2:24:25 PM: ​
2:24:25 PM:   Error location
2:24:25 PM:   In Build command from Netlify app:
2:24:25 PM:   npm run build
2:24:25 PM: ​
2:24:25 PM:   Resolved config
2:24:25 PM:   build:
2:24:25 PM:     command: npm run build
2:24:25 PM:     commandOrigin: ui
2:24:25 PM:     environment:
2:24:25 PM:       - CONTENTFUL_API_KEY
2:24:25 PM:       - INCOMING_HOOK_BODY
2:24:25 PM:       - INCOMING_HOOK_TITLE
2:24:25 PM:       - INCOMING_HOOK_URL
2:24:25 PM:     publish: /opt/build/repo/public
2:24:25 PM:     publishOrigin: ui
2:24:25 PM:   plugins:
2:24:25 PM:     - inputs: {}
2:24:25 PM:       origin: ui
2:24:25 PM:       package: '@netlify/plugin-gatsby'
2:24:25 PM:   redirects:
2:24:25 PM:     - from: /api/*      status: 200      to: /.netlify/functions/gatsbyCaching artifacts
2:24:25 PM: Started saving node modules
2:24:25 PM: Finished saving node modules
2:24:25 PM: Started saving build plugins
2:24:25 PM: Finished saving build plugins
2:24:25 PM: Started saving pip cache
2:24:25 PM: Finished saving pip cache
2:24:25 PM: Started saving emacs cask dependencies
2:24:26 PM: Finished saving emacs cask dependencies
2:24:26 PM: Started saving maven dependencies
2:24:26 PM: Finished saving maven dependencies
2:24:26 PM: Started saving boot dependencies
2:24:26 PM: Finished saving boot dependencies
2:24:26 PM: Started saving rust rustup cache
2:24:26 PM: Finished saving rust rustup cache
2:24:26 PM: Started saving go dependencies
2:24:26 PM: Finished saving go dependencies
2:24:26 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:24:26 PM: Creating deploy upload records
2:24:26 PM: Failing build: Failed to build site
2:24:26 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
2:24:26 PM: Finished processing build request in 46.80140155s

I assumed with the queries (Using graphql to pull images from the CMS contentful) pulling the images straight from contentful, i wouldn’t need the images in my local files, but i don’t know what is happening here. If i clear cache and deploy the site it works fine every time, but with continuous deployment if i make a change on contentful that causes a redeployment with the webhook, i get some kind of cache error and it is always with the images and im kinda lost at this point.

hi there, is there something special about the image above? are other images loading correctly?

Nothing special about it, just an image pulled from the web and uploaded to Contentful to be used on my page. Everything loads perfectly when i first deploy the page and when i clear the cache and re-deploy, but when i change something in contentful to force a redeploy via webhook, i get this error for the images.

Could you try removing the Gatsby plugin that Netlify auto-installs?