Gatsby fails to build pages on netlify: WebpackError: Minified React error #65;

My site builds fine locally. On Netlify it crashes when it starts building pages.

Here is the netlify log.

9:14:54 AM: Build ready to start
9:14:57 AM: build-image version: 0582042f4fc261adc7bd8333f34884959c577302
9:14:57 AM: build-image tag: v3.7.6
9:14:57 AM: buildbot version: b202e9eba5b6cc783678acec06610ee45927f6c6
9:14:57 AM: Fetching cached dependencies
9:14:57 AM: Failed to fetch cache, continuing with build
9:14:57 AM: Starting to prepare the repo for build
9:14:57 AM: No cached dependencies found. Cloning fresh repo
9:14:57 AM: git clone https://github.com/avodynamics/avodynamics.com
9:14:59 AM: Preparing Git Reference refs/heads/master
9:15:00 AM: Parsing package.json dependencies
9:15:01 AM: Starting build script
9:15:01 AM: Installing dependencies
9:15:01 AM: Python version set to 2.7
9:15:02 AM: Attempting node version 'v14.2.0' from .nvmrc
9:15:03 AM: Downloading and installing node v14.2.0...
9:15:03 AM: Downloading https://nodejs.org/dist/v14.2.0/node-v14.2.0-linux-x64.tar.xz...
9:15:03 AM: Computing checksum with sha256sum
9:15:04 AM: Checksums matched!
9:15:07 AM: Now using node v14.2.0 (npm v6.14.4)
9:15:07 AM: Started restoring cached build plugins
9:15:07 AM: Finished restoring cached build plugins
9:15:07 AM: Attempting ruby version 2.7.1, read from environment
9:15:09 AM: Using ruby version 2.7.1
9:15:09 AM: Using PHP version 5.6
9:15:09 AM: Started restoring cached node modules
9:15:09 AM: Finished restoring cached node modules
9:15:09 AM: Installing NPM modules using NPM version 6.14.4
9:15:11 AM: npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
9:15:14 AM: npm WARN deprecated polished@1.9.3: polished@2.X is no longer supported. Please upgrade to @latest for important bug and security fixes.
9:15:23 AM: npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
9:15:27 AM: npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
9:15:28 AM: npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
9:15:29 AM: npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
9:15:29 AM: npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
9:15:29 AM: npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
9:15:29 AM: npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
9:15:31 AM: npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
9:15:32 AM: npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
9:15:37 AM: npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
9:16:50 AM: > sharp@0.28.2 install /opt/build/repo/node_modules/sharp
9:16:50 AM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
9:16:51 AM: sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.6/libvips-8.10.6-linux-x64.tar.br
9:16:53 AM: > core-js@2.6.12 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
9:16:53 AM: > node -e "try{require('./postinstall')}catch(e){}"
9:16:53 AM: > core-js@3.12.1 postinstall /opt/build/repo/node_modules/core-js
9:16:53 AM: > node -e "try{require('./postinstall')}catch(e){}"
9:16:54 AM: > core-js-pure@3.12.1 postinstall /opt/build/repo/node_modules/core-js-pure
9:16:54 AM: > node -e "try{require('./postinstall')}catch(e){}"
9:16:55 AM: > gatsby-telemetry@2.4.1 postinstall /opt/build/repo/node_modules/gatsby-telemetry
9:16:55 AM: > node src/postinstall.js || true
9:16:55 AM: > mozjpeg@7.0.0 postinstall /opt/build/repo/node_modules/mozjpeg
9:16:55 AM: > node lib/install.js
9:16:56 AM:   βœ” mozjpeg pre-build test passed successfully
9:16:56 AM: > pngquant-bin@6.0.0 postinstall /opt/build/repo/node_modules/pngquant-bin
9:16:56 AM: > node lib/install.js
9:16:56 AM:   βœ” pngquant pre-build test passed successfully
9:16:56 AM: > gatsby-cli@3.4.1 postinstall /opt/build/repo/node_modules/gatsby/node_modules/gatsby-cli
9:16:56 AM: > node scripts/postinstall.js
9:16:56 AM: > gatsby@3.4.2 postinstall /opt/build/repo/node_modules/gatsby
9:16:56 AM: > node scripts/postinstall.js
9:16:59 AM: npm notice created a lockfile as package-lock.json. You should commit this file.
9:16:59 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/chokidar/node_modules/fsevents):
9:16:59 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
9:16:59 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents):
9:16:59 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
9:16:59 AM: npm WARN express-graphql@0.9.0 requires a peer of graphql@^14.4.1 but none is installed. You must install peer dependencies yourself.
9:16:59 AM: npm WARN tsutils@3.21.0 requires a peer of 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 but none is installed. You must install peer dependencies yourself.
9:16:59 AM: npm WARN ts-node@9.1.1 requires a peer of typescript@>=2.7 but none is installed. You must install peer dependencies yourself.
9:16:59 AM: added 2580 packages from 1153 contributors and audited 2592 packages in 108.702s
9:17:00 AM: 282 packages are looking for funding
9:17:00 AM:   run `npm fund` for details
9:17:00 AM: found 42 vulnerabilities (41 moderate, 1 high)
9:17:00 AM:   run `npm audit fix` to fix them, or `npm audit` for details
9:17:00 AM: NPM modules installed
9:17:01 AM: Started restoring cached go cache
9:17:01 AM: Finished restoring cached go cache
9:17:01 AM: go version go1.14.4 linux/amd64
9:17:01 AM: go version go1.14.4 linux/amd64
9:17:01 AM: Installing missing commands
9:17:01 AM: Verify run directory
9:17:03 AM: ​
9:17:03 AM: ────────────────────────────────────────────────────────────────
9:17:03 AM:   Netlify Build                                                 
9:17:03 AM: ────────────────────────────────────────────────────────────────
9:17:03 AM: ​
9:17:03 AM: ❯ Version
9:17:03 AM:   @netlify/build 11.12.0
9:17:03 AM: ​
9:17:03 AM: ❯ Flags
9:17:03 AM:   deployId: 609a915e632d4800071cf3b6
9:17:03 AM: ​
9:17:03 AM: ❯ Current directory
9:17:03 AM:   /opt/build/repo
9:17:03 AM: ​
9:17:03 AM: ❯ Config file
9:17:03 AM:   No config file was defined: using default values.
9:17:03 AM: ​
9:17:03 AM: ❯ Context
9:17:03 AM:   production
9:17:03 AM: ​
9:17:03 AM: ────────────────────────────────────────────────────────────────
9:17:03 AM:   1. Build command from Netlify app                             
9:17:03 AM: ────────────────────────────────────────────────────────────────
9:17:03 AM: ​
9:17:03 AM: $ npm run build
9:17:03 AM: > avodynamics@0.1.2 build /opt/build/repo
9:17:03 AM: > gatsby build
9:17:07 AM: success open and validate gatsby-configs - 0.034s
9:17:07 AM: success load plugins - 0.868s
9:17:08 AM: success onPreInit - 0.042s
9:17:08 AM: success initialize cache - 0.006s
9:17:08 AM: success copy gatsby files - 0.068s
9:17:08 AM: success onPreBootstrap - 0.018s
9:17:08 AM: success createSchemaCustomization - 0.005s
9:17:08 AM: success Checking for changed pages - 0.000s
9:17:08 AM: success source and transform nodes - 0.107s
9:17:08 AM: success building schema - 0.645s
9:17:08 AM: success createPages - 0.007s
9:17:09 AM: success createPagesStatefully - 0.079s
9:17:09 AM: info Total nodes: 51, SitePage nodes: 6 (use --verbose for breakdown)
9:17:09 AM: success Checking for changed pages - 0.000s
9:17:09 AM: success update schema - 0.072s
9:17:09 AM: success onPreExtractQueries - 0.001s
9:17:11 AM: success extract queries from components - 2.354s
9:17:11 AM: success write out redirect data - 0.119s
9:17:11 AM: success Build manifest and related icons - 0.279s
9:17:11 AM: success onPostBootstrap - 0.283s
9:17:11 AM: info bootstrap finished - 8.291s
9:17:11 AM: success run page queries - 0.015s - 5/5 328.97/s
9:17:11 AM: success write out requires - 0.006s
9:17:40 AM: Webpack Bundle Analyzer is started at http://127.0.0.1:3001
9:17:40 AM: Use Ctrl+C to close it
9:17:40 AM: success Building production JavaScript and CSS bundles - 28.524s
9:17:40 AM: success Rewriting compilation hashes - 0.001s
9:17:46 AM: success Building HTML renderer - 6.167s
9:17:46 AM: failed Building static HTML for pages - 0.305s
9:17:46 AM: error Building static HTML failed for path "/404/"
9:17:47 AM: 
9:17:47 AM:   1 | function _defineProperty(obj, key, value) {
9:17:47 AM: > 2 |   if (key in obj) {
9:17:47 AM:     | ^
9:17:47 AM:   3 |     Object.defineProperty(obj, key, {
9:17:47 AM:   4 |       value: value,
9:17:47 AM:   5 |       enumerable: true,
9:17:47 AM: 
9:17:47 AM:   WebpackError: Minified React error #65; visit https://reactjs.org/docs/error-d  ecoder.html?invariant=65&args[]=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2Cphn2zyb4bw  xucz0iahr0cdovl3d3dy53my5vcmcvmjawmc9zdmciihzpzxdcb3g9ijagmca0ny45osa0oci%2Bpg  rlznm%2Bphn0ewxlpi5mztfkzjg5ni1hmty0ltrizgqtywywzi04zmiwndhlowrmmzz7zmlsbdojn2  eymde2o30uyjqyotfmnzqtowi0oc00ytu2lwizmgytztzjztlkzmrhmwy3e2zpbgw6izbmnzg3yjt9  pc9zdhlszt48l2rlznm%2Bpgcgawq9imfinja2owm0lwe3zdmtngzmms04mgrlltbimjkwmwnjzjgw  nyigzgf0ys1uyw1lpsjmyxllciayij48zybpzd0izta3nwjjzdmtowfkmc00nmm4lwi3m2utmmu3nw  yxzwizngewiibkyxrhlw5hbwu9ilntywxsiexvz28ipjxwyxroignsyxnzpsjmztfkzjg5ni1hmty0  ltrizgqtywywzi04zmiwndhlowrmmzyiigq9ik00ns42ldezljy4ys4zmy4zmywwldasmswums4xny  wymy44mswymy44mswwldasms0umjismjauodnbmjmuotmsmjmuotmsmcwwldesmjgsndcunjzjls43  ms4xmi0xljqxljitmi4xmy4ynkeymy41niwymy41niwwldasmswymyw0ogexos40niwxos40niwwld  asms0yls4xnywymy41mywymy41mywwldasms00ljyxlteumdzbmjiundksmjiundksmcwwldesoc4y  nyw0mmezms4zmswzms4zmswwldasms0zljm1ltmunjvjls40ni0untgtljkxlteumtgtms4zns0xlj  c4ys4yns4ynswwldasmswwls4zyy43ny0xlju0ldeuntmtmy4xldiumjktnc42nxeylji0ltquntms  nc40oc05lja2bdmuntetny4xmxeyltqumtesnc4wni04ljiyyy40ms0uoduuodmtms42oswxlji1lt  iuntqsmcwwlc4wns0umdkumdktlje2tdmwljqsmjcumthhlje3lje3ldasmcwxls4xmiwwsdi2ljqy  ys4ymi4ymiwwldasms0umjitlje1bc00ljy1ltkunthjls43ns0xlju1lteuns0zljexltiumjytnc  42nmwtlja2ls4xmmmtlja2ldatlja3lja3ls4wos4xmuwxnswyms4znvexmi4znswyni43nyw5ljcy  ldmyljjdoc45ncwzmy43osw4lje3ldm1ljm5ldcumzksmzdhlji2lji2ldasmcwwldasljmxldixlj  i3ldixlji3ldasmcwwldewlje0lddbmtkunjgsmtkunjgsmcwwldasmjaunsw0nwmunjiumswxlji1  lje4ldeuodgumjnhmjeuntgsmjeuntgsmcwwldasmi4yny4wnkeyms4zmywyms4zmywwldasmcw0nc  4xmywzmc44ncwyms4wnswyms4wnswwldasmcw0ns4yncwymywyms42ocwyms42ocwwldasmcw0nc4w  nywxn2eumjgumjgsmcwwldesmc0umjvaii8%2Bphbhdgggy2xhc3m9imi0mjkxzjc0ltlindgtnge1  ni1imzbmlwu2y2u5zgzkytfmnyigzd0ittqzljkxldewljy1yy0uodutms0xljy4ltiumdytmi41ny  0zlja1ytiwljqsmjauncwwldasmc0yljuxltiundfbmjqsmjqsmcwwldasmjguntqundvjls42ls4x  mi0xljitljiylteuoc0umjlhni4znsw2ljm1ldasmcwwltetlja4ldiumtismi4xmiwwldasmc0unt  ysmeeuodeuodesmcwwldasmjusmgeunzcunzcsmcwwldatljmsmhetmswwltiumdcsmewyms41my4x  m2mtlju5lja2lteumtkumtqtms43oc4yns0undiumdgtljg0lje1lteumjuumjdhnc41nyw0lju3ld  asmcwwls45ljizljeyljeyldasmcwwls4xldbomgeunziunzismcwwldatlji1lja3ldiumtismi4x  miwwldasmc0umzyumswymi40mywymi40mywwldasmc00ljm3ldeuodzbljiyljiyldasmcwwldeylj  qsm2mtljuzljmtms4wns42mi0xlju2ljk1qti1ldi1ldasmcwwldguntgsns42mmeymy45mswymy45  mswwldasmc0yljqsmi4zmiwymi44miwymi44miwwldasmc0xljk0ldiundrbmjmuodqsmjmuodqsmc  wwldasmiwxnc41miwymy4yniwymy4yniwwldasmcwxlde3lja5ytiyljexldiyljexldasmcwwls41  niwylji3yzasljmzls4xmy42ns0umtysmxyumtfhlja2lja2ldasmcwwldaslja4bdaslje4czasmc  wwldbhms4xnswxlje1ldasmcwwldaslji2ldasmcwwldasmcwwldbbmtkuntismtkuntismcwwldas  mcwymy42owmwlc41miwwldesmcwxlju1ys4xmy4xmywwldasmcwwlc4xmiwxmi42nswxmi42nswwld  asmcwumtmsms41lje1lje1ldasmcwwldasljezbdaslji1ys4wni4wniwwldasmcwwlc4wns44mi44  miwwldasmcwwlc4ymmmumdguntmumtcsms4wni4yoswxlju5yti0ljusmjqunswwldasmcwxlji5ld  qumtfzmcwumteumdkumtqumdytljexlja4ls4xnmwxltiumddjlje4ls4zni4zny0unziuntmtms4x  lja1ldaslja1ls4wocwwls4xmmewldasmcwwldasmcwwldeunjysms42niwwldasmc0umtetljm4bd  atljexczasmcwwldbomgeuodiuodismcwwldatlja3ls4zldasmcwwldasmcwwldbwmjlhmjiumdks  mjiumdksmcwwldetljqyltiumjcsmtkumdksmtkumdksmcwwldetlje3ltiumtqsmjaumzysmjaumz  ysmcwwldeslje0ltnbmtkumdgsmtkumdgsmcwwldesmy4zmswxoweymc4xnswymc4xnswwldasmswx  ljitmy41niwymc45miwymc45miwwldasmswyljgzltqunjljljqtljuxljg0ltesms4yos0xljq4yt  izljyyldizljyyldasmcwxldeuotutms44yy4zos0umziunzktljyyldeumi0uotjzljy5ls40niwx  lja1ls42oge2lja4ldyumdgsmcwwldasljy0ls4zowwumjmtljeyytixlja2ldixlja2ldasmcwxld  itmswymc4zoswymc4zoswwldasmswzltesncw0ldasmcwwlc41os0umtzsljeyldbjljq3ls4xljk1  ls4xoswxljqzls4ynmeyms44nswyms44nswwldasmswzljeyls4yngguowwxljexlja4yte5ljqyld  e5ljqyldasmcwxldiumzkumzzbmjauodksmjauodksmcwwldesmzqunzksns43ytixljmzldixljmz  ldasmcwxldmuodqsmi45mwmundgunduuotiuotmsms4zniwxljqxys4xoc4xocwwldasmswwlc4yns  4woc4wocwwldasmcwwlc4wnxetmy42osw3ljyxltcumzysmtuumjfjls4xos4zoc0umzgunzutlju0  ldeumtromgmtlja1ldatlja2lja5ls4woc4xnc0unzysms41ns0xljuxldmumtetmi4yniw0ljy2ls  4yns41my0unswxlja2ls43niwxlju5bdaslja2yy0umzyunzqtljcxldeundgtms4wnywyljixys4y  nc4yncwwldasms0ums4xnwwtlja2ls4xmwmtljm5ls43oc0unzutms41ny0xlje2ltiumzqtlji0ls  40ni0undqtms0unjctms40my0untutms4xns0xljexltiumy0xljy3ltmundvslteunjktmy40ni0u  odqtms43nwmtlji5ls42ms0uni0xljizls44os0xljg0ldatlja4ls4woc0umtmtlje4ls4xm0gxny  4ynmmtljexldatlje0lja3ls4xny4xnc0untesms0xldiumdktms41miwzljezldasmc0umduumdcs  mcwumtjhljc0ljc0ldasmcwwlc4ymswwsde4ljfhlji2lji2ldasmcwxlc4yny4xn2mundeuoduuod  msms42oswxlji0ldiuntnxms4yocwylju4ldiuntysns4xnmmumtkumzkumzcunzguntgsms4xnmex  ljm3ldeumzcsmcwwldaslje2ljmyldmuodmsmy44mywwldasmcwumy42mswxldesmcwwldaslja3lj  e1bdeumtesmi4yniwzljmzldyunzvhljc1ljc1ldasmcwxlc4wny4xmmmumdysmcwumdctlja4lja5  ls4xmi4xoc0umzuumzmtljcxljutms4wni4wny0umtcumtctljmylji1ls40oc4zni0unziunzitms  40mywxlja2ltiumtuumtitlji2lji2ls41ms4zoc0unzdzljm5ls43os41oc0xlje4yzatlja1lja4  ls4xlja1ls4xny4xoc0umzqumzctljy3lju0ltfzljiyls40oc4znc0unzfjljmtlju4lju3lteumt  yuodytms43nc4yls4zos4zos0unzkuntktms4xohmuntitmswunzytms41n2mumdgtljiumi0umzku  my0untlxmi42ms01lji4lduumi0xmc41ogwumzutljy5tdqyljm5lde0bdeuntmtmy4xm0eumtgumt  gsmcwwldasndmuotesmtaunjvaii8%2Bpc9npjwvzz48l3n2zz4%3D for the full message or   use the non-minified dev environment for full errors and additional helpful w  arnings.
9:17:47 AM:   
9:17:47 AM:   - defineProperty.js:2 
9:17:47 AM:     [avodynamics]/[@babel]/runtime/helpers/defineProperty.js:2:1
9:17:47 AM:   
9:17:47 AM:   - static-entry.js:263 
9:17:47 AM:     avodynamics/.cache/static-entry.js:263:20
9:17:47 AM:   
9:17:47 AM: 
9:17:47 AM: npm ERR! code ELIFECYCLE
9:17:47 AM: npm ERR! errno 1
9:17:47 AM: npm ERR! avodynamics@0.1.2 build: `gatsby build`
9:17:47 AM: npm ERR! Exit status 1
9:17:47 AM: npm ERR!
9:17:47 AM: npm ERR! Failed at the avodynamics@0.1.2 build script.
9:17:47 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
9:17:47 AM: npm ERR! A complete log of this run can be found in:
9:17:47 AM: npm ERR!     /opt/buildhome/.npm/_logs/2021-05-11T14_17_47_218Z-debug.log
9:17:47 AM: ​
9:17:47 AM: ────────────────────────────────────────────────────────────────
9:17:47 AM:   "build.command" failed                                        
9:17:47 AM: ────────────────────────────────────────────────────────────────
9:17:47 AM: ​
9:17:47 AM:   Error message
9:17:47 AM:   Command failed with exit code 1: npm run build
9:17:47 AM: ​
9:17:47 AM:   Error location
9:17:47 AM:   In Build command from Netlify app:
9:17:47 AM:   npm run build
9:17:47 AM: ​
9:17:47 AM:   Resolved config
9:17:47 AM:   build:
9:17:47 AM:     command: npm run build
9:17:47 AM:     commandOrigin: ui
9:17:47 AM:     publish: /opt/build/repo/public
9:17:47 AM: Caching artifacts
9:17:47 AM: Started saving node modules
9:17:47 AM: Finished saving node modules
9:17:47 AM: Started saving build plugins
9:17:47 AM: Finished saving build plugins
9:17:47 AM: Started saving pip cache
9:17:47 AM: Finished saving pip cache
9:17:47 AM: Started saving emacs cask dependencies
9:17:47 AM: Finished saving emacs cask dependencies
9:17:47 AM: Started saving maven dependencies
9:17:47 AM: Finished saving maven dependencies
9:17:47 AM: Started saving boot dependencies
9:17:47 AM: Finished saving boot dependencies
9:17:47 AM: Started saving rust rustup cache
9:17:47 AM: Finished saving rust rustup cache
9:17:47 AM: Started saving go dependencies
9:17:47 AM: Finished saving go dependencies
9:17:51 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:17:51 AM: Creating deploy upload records
9:17:51 AM: Failing build: Failed to build site
9:17:51 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2
9:17:51 AM: Finished processing build request in 2m54.542943228s

Here are my dependencies

"dependencies": {
    "babel-plugin-polished": "^1.1.0",
    "dotenv": "^9.0.2",
    "gatsby": "^3.4.2",
    "gatsby-image": "^3.4.0",
    "gatsby-plugin-canonical-urls": "^3.4.0",
    "gatsby-plugin-google-gtag": "^3.4.0",
    "gatsby-plugin-image": "^1.4.1",
    "gatsby-plugin-manifest": "^3.4.0",
    "gatsby-plugin-nprogress": "^3.4.0",
    "gatsby-plugin-offline": "^4.4.0",
    "gatsby-plugin-react-helmet": "^4.4.0",
    "gatsby-plugin-react-svg": "^3.0.1",
    "gatsby-plugin-sharp": "^3.4.2",
    "gatsby-plugin-sitemap": "^4.0.0",
    "gatsby-plugin-styled-components": "^4.4.0",
    "gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.22",
    "gatsby-source-filesystem": "^3.4.0",
    "gatsby-source-graphql": "^3.4.0",
    "gatsby-transformer-sharp": "^3.4.0",
    "iframe-resizer-react": "^1.1.0",
    "polished": "^4.1.2",
    "postcss": "^8.2.15",
    "prop-types": "^15.7.2",
    "react": "^17.0.2",
    "react-anchor-link-smooth-scroll": "^1.0.12",
    "react-dom": "^17.0.2",
    "react-helmet": "^6.1.0",
    "react-player": "^2.9.0",
    "styled-components": "^5.3.0",
    "styled-icons": "^10.33.0",
    "styled-reboot": "^5.0.0",
    "stylelint": "^13.13.1",
    "stylelint-config-recommended": "^5.0.0",
    "stylelint-config-styled-components": "^0.1.1",
    "stylelint-processor-styled-components": "^1.10.0"
  },
"devDependencies": {
    "babel-eslint": "^10.1.0",
    "babel-plugin-styled-components": "^1.12.0",
    "babel-preset-gatsby": "^1.4.0",
    "eslint": "^7.8.1",
    "eslint-config-airbnb": "^18.2.0",
    "eslint-config-prettier": "^6.11.0",
    "eslint-config-wesbos": "^1.0.1",
    "eslint-plugin-html": "^6.1.0",
    "eslint-plugin-import": "^2.22.0",
    "eslint-plugin-jsx-a11y": "^6.3.1",
    "eslint-plugin-prettier": "^3.1.4",
    "eslint-plugin-react": "^7.20.6",
    "eslint-plugin-react-hooks": "^4.1.2",
    "prettier": "^2.1.1"
  },

Gatsby Config

const config = require('./src/data/config');

require('dotenv').config({
  path: `.env.${process.env.NODE_ENV}`,
});

module.exports = {
  siteMetadata: {
    title: config.defaultTitle,
    description: config.defaultDescription,
    author: config.author,
  },
  plugins: [
    'gatsby-plugin-react-helmet',
    'gatsby-plugin-styled-components',
    `gatsby-plugin-image`,
    'gatsby-plugin-sharp',
    'gatsby-transformer-sharp',
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        path: `${__dirname}/src/assets/images`,
      },
    },
    {
      resolve: 'gatsby-plugin-nprogress',
      options: {
        color: config.themeColor,
        showSpinner: false,
      },
    },
    {
      resolve: 'gatsby-plugin-manifest',
      options: {
        name: config.defaultTitle,
        short_name: 'AVO Dynamics',
        start_url: '/',
        background_color: config.backgroundColor,
        theme_color: config.themeColor,
        display: 'minimal-ui',
        icon: './static/favicon/favicon-512.png',
      },
    },
    'gatsby-plugin-offline',
    {
      resolve: 'gatsby-plugin-react-svg',
      options: {
        rule: {
          include: /assets\\vector/,
        },
      },
    },
    'gatsby-plugin-webpack-bundle-analyser-v2', // http://127.0.0.1:3001?
  ],
};

and an example page it fails on from the β€˜pages’ folder

import React from 'react';
import { Layout, SEO } from 'components/common';

const p404 = () => (
  <Layout>
    <SEO title="404: Not found" location="/404" />
    <h1>NOT FOUND</h1>
    <p>You just hit a route that doesn&#39;t exist... πŸ™‡β€β™€οΈ</p>
  </Layout>
);

export default p404;

hey @slourcey,

i had a chance to talk to one of our gatsby folks today and we’re still not quite sure what is going on here, but we have some ideas:

  • is it possible you are using a different node version locally than you are when you deploy?

If not, they should be the same. You can specify the node version to use on our servers. Here’s how:

this seems to be an SVG related issue, are you using SVGs in your project?

I am using SVGs. They’re in the header and footer, processed by β€˜gatsby-plugin-react-svg’

I’m using the name version of node, but likely not the same version of NPM - if that might make a difference.

Just tried to set env to production and to use the same npm version. It’s still not working, so I’m making the repo public for now. It can be viewed here: Site Repo

Another update. I tried to remove the footer which was pulling SVGs from an NPM module. There are still our SVGs in the header and on the pages, but they’re locally hosted. The build fails with a very similar error, but it’s slightly different. Again, only failing on Netlify. No errors what so ever on development or production locally.

10:14:49 AM: Build ready to start
10:14:50 AM: build-image version: 0582042f4fc261adc7bd8333f34884959c577302
10:14:50 AM: build-image tag: v3.7.6
10:14:50 AM: buildbot version: d3b46eed9a3db45474c8cf94296b8a366d780a85
10:14:51 AM: Fetching cached dependencies
10:14:51 AM: Failed to fetch cache, continuing with build
10:14:51 AM: Starting to prepare the repo for build
10:14:51 AM: No cached dependencies found. Cloning fresh repo
10:14:51 AM: git clone https://github.com/avodynamics/avodynamics.com
10:14:53 AM: Preparing Git Reference refs/heads/master
10:14:53 AM: Parsing package.json dependencies
10:14:54 AM: Starting build script
10:14:54 AM: Installing dependencies
10:14:54 AM: Python version set to 2.7
10:14:55 AM: Attempting node version 'v15.10.0' from .nvmrc
10:14:56 AM: Downloading and installing node v15.10.0...
10:14:56 AM: Downloading https://nodejs.org/dist/v15.10.0/node-v15.10.0-linux-x64.tar.xz...
10:14:56 AM: Computing checksum with sha256sum
10:14:56 AM: Checksums matched!
10:15:00 AM: Now using node v15.10.0 (npm v7.5.3)
10:15:00 AM: Started restoring cached build plugins
10:15:00 AM: Finished restoring cached build plugins
10:15:00 AM: Attempting ruby version 2.7.1, read from environment
10:15:01 AM: Using ruby version 2.7.1
10:15:02 AM: Using PHP version 5.6
10:15:02 AM: Started restoring cached node modules
10:15:02 AM: Finished restoring cached node modules
10:15:02 AM: Found npm version (7.5.3) that doesn't match expected (7.5.6)Installing npm at version 7.5.6
10:15:05 AM: removed 5 packages, changed 14 packages, and audited 254 packages in 3s
10:15:05 AM: 11 packages are looking for funding
10:15:05 AM:   run `npm fund` for details
10:15:05 AM: found 0 vulnerabilities
10:15:05 AM: NPM installed successfully
10:15:06 AM: Installing NPM modules using NPM version 7.5.6
10:15:26 AM: npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
10:15:26 AM: npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
10:15:30 AM: npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
10:15:48 AM: npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
10:15:50 AM: npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
10:15:50 AM: npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
10:15:50 AM: npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
10:15:51 AM: npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
10:15:52 AM: npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
10:15:55 AM: npm WARN deprecated polished@1.9.3: polished@2.X is no longer supported. Please upgrade to @latest for important bug and security fixes.
10:16:00 AM: npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
10:16:07 AM: added 2420 packages, and audited 2421 packages in 1m
10:16:07 AM: 250 packages are looking for funding
10:16:07 AM:   run `npm fund` for details
10:16:07 AM: 32 vulnerabilities (27 moderate, 5 high)
10:16:07 AM: To address issues that do not require attention, run:
10:16:07 AM:   npm audit fix
10:16:07 AM: To address all issues (including breaking changes), run:
10:16:07 AM:   npm audit fix --force
10:16:07 AM: Run `npm audit` for details.
10:16:07 AM: NPM modules installed
10:16:08 AM: Started restoring cached go cache
10:16:08 AM: Finished restoring cached go cache
10:16:08 AM: go version go1.14.4 linux/amd64
10:16:08 AM: go version go1.14.4 linux/amd64
10:16:08 AM: Installing missing commands
10:16:08 AM: Verify run directory
10:16:10 AM: ​
10:16:10 AM: ────────────────────────────────────────────────────────────────
10:16:10 AM:   Netlify Build                                                 
10:16:10 AM: ────────────────────────────────────────────────────────────────
10:16:10 AM: ​
10:16:10 AM: ❯ Version
10:16:10 AM:   @netlify/build 11.14.0
10:16:10 AM: ​
10:16:10 AM: ❯ Flags
10:16:10 AM:   deployId: 609d42684e9b400008918eef
10:16:10 AM: ​
10:16:10 AM: ❯ Current directory
10:16:10 AM:   /opt/build/repo
10:16:10 AM: ​
10:16:10 AM: ❯ Config file
10:16:10 AM:   No config file was defined: using default values.
10:16:10 AM: ​
10:16:10 AM: ❯ Context
10:16:10 AM:   production
10:16:10 AM: ​
10:16:10 AM: ────────────────────────────────────────────────────────────────
10:16:10 AM:   1. Build command from Netlify app                             
10:16:10 AM: ────────────────────────────────────────────────────────────────
10:16:10 AM: ​
10:16:10 AM: $ npm run build
10:16:10 AM: > avodynamics@0.1.2 build
10:16:10 AM: > gatsby build
10:16:13 AM: success open and validate gatsby-configs - 0.042s
10:16:14 AM: success load plugins - 1.053s
10:16:14 AM: success onPreInit - 0.050s
10:16:14 AM: success initialize cache - 0.008s
10:16:14 AM: success copy gatsby files - 0.069s
10:16:14 AM: success onPreBootstrap - 0.019s
10:16:14 AM: success createSchemaCustomization - 0.006s
10:16:14 AM: success Checking for changed pages - 0.000s
10:16:14 AM: success source and transform nodes - 0.081s
10:16:15 AM: success building schema - 0.529s
10:16:15 AM: success createPages - 0.006s
10:16:15 AM: success createPagesStatefully - 0.089s
10:16:15 AM: info Total nodes: 52, SitePage nodes: 5 (use --verbose for breakdown)
10:16:15 AM: success Checking for changed pages - 0.000s
10:16:15 AM: success update schema - 0.095s
10:16:15 AM: success onPreExtractQueries - 0.000s
10:16:17 AM: success extract queries from components - 2.301s
10:16:17 AM: success write out redirect data - 0.023s
10:16:17 AM: success Build manifest and related icons - 0.205s
10:16:17 AM: success onPostBootstrap - 0.209s
10:16:17 AM: info bootstrap finished - 7.552s
10:16:17 AM: success run page queries - 0.004s - 5/5 1119.49/s
10:16:18 AM: success write out requires - 0.004s
10:16:45 AM: Webpack Bundle Analyzer is started at http://127.0.0.1:3001
10:16:45 AM: Use Ctrl+C to close it
10:16:45 AM: success Building production JavaScript and CSS bundles - 27.692s
10:16:45 AM: success Rewriting compilation hashes - 0.017s
10:16:51 AM: success Building HTML renderer - 5.672s
10:16:51 AM: failed Building static HTML for pages - 0.314s
10:16:51 AM: error Building static HTML failed for path "/404/"
10:16:51 AM: 
10:16:51 AM:   261 |     if (!bodyHtml) {
10:16:51 AM:   262 |       try {
10:16:51 AM: > 263 |         bodyHtml = renderToString(bodyComponent)
10:16:51 AM:       |                    ^
10:16:51 AM:   264 |       } catch (e) {
10:16:51 AM:   265 |         // ignore @reach/router redirect errors
10:16:51 AM:   266 |         if (!isRedirect(e)) throw e
10:16:51 AM: 
10:16:51 AM:   WebpackError: Minified React error #65; visit https://reactjs.org/docs/error-d  ecoder.html?invariant=65&args[]=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2Cphn2zyb4bw  xucz0iahr0cdovl3d3dy53my5vcmcvmjawmc9zdmciihzpzxdcb3g9ijagmca0ny45osa0oci%2Bpg  rlznm%2Bphn0ewxlpi5mztfkzjg5ni1hmty0ltrizgqtywywzi04zmiwndhlowrmmzz7zmlsbdojn2  eymde2o30uyjqyotfmnzqtowi0oc00ytu2lwizmgytztzjztlkzmrhmwy3e2zpbgw6izbmnzg3yjt9  pc9zdhlszt48l2rlznm%2Bpgcgawq9imfinja2owm0lwe3zdmtngzmms04mgrlltbimjkwmwnjzjgw  nyigzgf0ys1uyw1lpsjmyxllciayij48zybpzd0izta3nwjjzdmtowfkmc00nmm4lwi3m2utmmu3nw  yxzwizngewiibkyxrhlw5hbwu9ilntywxsiexvz28ipjxwyxroignsyxnzpsjmztfkzjg5ni1hmty0  ltrizgqtywywzi04zmiwndhlowrmmzyiigq9ik00ns42ldezljy4ys4zmy4zmywwldasmswums4xny  wymy44mswymy44mswwldasms0umjismjauodnbmjmuotmsmjmuotmsmcwwldesmjgsndcunjzjls43  ms4xmi0xljqxljitmi4xmy4ynkeymy41niwymy41niwwldasmswymyw0ogexos40niwxos40niwwld  asms0yls4xnywymy41mywymy41mywwldasms00ljyxlteumdzbmjiundksmjiundksmcwwldesoc4y  nyw0mmezms4zmswzms4zmswwldasms0zljm1ltmunjvjls40ni0untgtljkxlteumtgtms4zns0xlj  c4ys4yns4ynswwldasmswwls4zyy43ny0xlju0ldeuntmtmy4xldiumjktnc42nxeylji0ltquntms  nc40oc05lja2bdmuntetny4xmxeyltqumtesnc4wni04ljiyyy40ms0uoduuodmtms42oswxlji1lt  iuntqsmcwwlc4wns0umdkumdktlje2tdmwljqsmjcumthhlje3lje3ldasmcwxls4xmiwwsdi2ljqy  ys4ymi4ymiwwldasms0umjitlje1bc00ljy1ltkunthjls43ns0xlju1lteuns0zljexltiumjytnc  42nmwtlja2ls4xmmmtlja2ldatlja3lja3ls4wos4xmuwxnswyms4znvexmi4znswyni43nyw5ljcy  ldmyljjdoc45ncwzmy43osw4lje3ldm1ljm5ldcumzksmzdhlji2lji2ldasmcwwldasljmxldixlj  i3ldixlji3ldasmcwwldewlje0lddbmtkunjgsmtkunjgsmcwwldasmjaunsw0nwmunjiumswxlji1  lje4ldeuodgumjnhmjeuntgsmjeuntgsmcwwldasmi4yny4wnkeyms4zmywyms4zmywwldasmcw0nc  4xmywzmc44ncwyms4wnswyms4wnswwldasmcw0ns4yncwymywyms42ocwyms42ocwwldasmcw0nc4w  nywxn2eumjgumjgsmcwwldesmc0umjvaii8%2Bphbhdgggy2xhc3m9imi0mjkxzjc0ltlindgtnge1  ni1imzbmlwu2y2u5zgzkytfmnyigzd0ittqzljkxldewljy1yy0uodutms0xljy4ltiumdytmi41ny  0zlja1ytiwljqsmjauncwwldasmc0yljuxltiundfbmjqsmjqsmcwwldasmjguntqundvjls42ls4x  mi0xljitljiylteuoc0umjlhni4znsw2ljm1ldasmcwwltetlja4ldiumtismi4xmiwwldasmc0unt  ysmeeuodeuodesmcwwldasmjusmgeunzcunzcsmcwwldatljmsmhetmswwltiumdcsmewyms41my4x  m2mtlju5lja2lteumtkumtqtms43oc4yns0undiumdgtljg0lje1lteumjuumjdhnc41nyw0lju3ld  asmcwwls45ljizljeyljeyldasmcwwls4xldbomgeunziunzismcwwldatlji1lja3ldiumtismi4x  miwwldasmc0umzyumswymi40mywymi40mywwldasmc00ljm3ldeuodzbljiyljiyldasmcwwldeylj  qsm2mtljuzljmtms4wns42mi0xlju2ljk1qti1ldi1ldasmcwwldguntgsns42mmeymy45mswymy45  mswwldasmc0yljqsmi4zmiwymi44miwymi44miwwldasmc0xljk0ldiundrbmjmuodqsmjmuodqsmc  wwldasmiwxnc41miwymy4yniwymy4yniwwldasmcwxlde3lja5ytiyljexldiyljexldasmcwwls41  niwylji3yzasljmzls4xmy42ns0umtysmxyumtfhlja2lja2ldasmcwwldaslja4bdaslje4czasmc  wwldbhms4xnswxlje1ldasmcwwldaslji2ldasmcwwldasmcwwldbbmtkuntismtkuntismcwwldas  mcwymy42owmwlc41miwwldesmcwxlju1ys4xmy4xmywwldasmcwwlc4xmiwxmi42nswxmi42nswwld  asmcwumtmsms41lje1lje1ldasmcwwldasljezbdaslji1ys4wni4wniwwldasmcwwlc4wns44mi44  miwwldasmcwwlc4ymmmumdguntmumtcsms4wni4yoswxlju5yti0ljusmjqunswwldasmcwxlji5ld  qumtfzmcwumteumdkumtqumdytljexlja4ls4xnmwxltiumddjlje4ls4zni4zny0unziuntmtms4x  lja1ldaslja1ls4wocwwls4xmmewldasmcwwldasmcwwldeunjysms42niwwldasmc0umtetljm4bd  atljexczasmcwwldbomgeuodiuodismcwwldatlja3ls4zldasmcwwldasmcwwldbwmjlhmjiumdks  mjiumdksmcwwldetljqyltiumjcsmtkumdksmtkumdksmcwwldetlje3ltiumtqsmjaumzysmjaumz  ysmcwwldeslje0ltnbmtkumdgsmtkumdgsmcwwldesmy4zmswxoweymc4xnswymc4xnswwldasmswx  ljitmy41niwymc45miwymc45miwwldasmswyljgzltqunjljljqtljuxljg0ltesms4yos0xljq4yt  izljyyldizljyyldasmcwxldeuotutms44yy4zos0umziunzktljyyldeumi0uotjzljy5ls40niwx  lja1ls42oge2lja4ldyumdgsmcwwldasljy0ls4zowwumjmtljeyytixlja2ldixlja2ldasmcwxld  itmswymc4zoswymc4zoswwldasmswzltesncw0ldasmcwwlc41os0umtzsljeyldbjljq3ls4xljk1  ls4xoswxljqzls4ynmeyms44nswyms44nswwldasmswzljeyls4yngguowwxljexlja4yte5ljqyld  e5ljqyldasmcwxldiumzkumzzbmjauodksmjauodksmcwwldesmzqunzksns43ytixljmzldixljmz  ldasmcwxldmuodqsmi45mwmundgunduuotiuotmsms4zniwxljqxys4xoc4xocwwldasmswwlc4yns  4woc4wocwwldasmcwwlc4wnxetmy42osw3ljyxltcumzysmtuumjfjls4xos4zoc0umzgunzutlju0  ldeumtromgmtlja1ldatlja2lja5ls4woc4xnc0unzysms41ns0xljuxldmumtetmi4yniw0ljy2ls  4yns41my0unswxlja2ls43niwxlju5bdaslja2yy0umzyunzqtljcxldeundgtms4wnywyljixys4y  nc4yncwwldasms0ums4xnwwtlja2ls4xmwmtljm5ls43oc0unzutms41ny0xlje2ltiumzqtlji0ls  40ni0undqtms0unjctms40my0untutms4xns0xljexltiumy0xljy3ltmundvslteunjktmy40ni0u  odqtms43nwmtlji5ls42ms0uni0xljizls44os0xljg0ldatlja4ls4woc0umtmtlje4ls4xm0gxny  4ynmmtljexldatlje0lja3ls4xny4xnc0untesms0xldiumdktms41miwzljezldasmc0umduumdcs  mcwumtjhljc0ljc0ldasmcwwlc4ymswwsde4ljfhlji2lji2ldasmcwxlc4yny4xn2mundeuoduuod  msms42oswxlji0ldiuntnxms4yocwylju4ldiuntysns4xnmmumtkumzkumzcunzguntgsms4xnmex  ljm3ldeumzcsmcwwldaslje2ljmyldmuodmsmy44mywwldasmcwumy42mswxldesmcwwldaslja3lj  e1bdeumtesmi4yniwzljmzldyunzvhljc1ljc1ldasmcwxlc4wny4xmmmumdysmcwumdctlja4lja5  ls4xmi4xoc0umzuumzmtljcxljutms4wni4wny0umtcumtctljmylji1ls40oc4zni0unziunzitms  40mywxlja2ltiumtuumtitlji2lji2ls41ms4zoc0unzdzljm5ls43os41oc0xlje4yzatlja1lja4  ls4xlja1ls4xny4xoc0umzqumzctljy3lju0ltfzljiyls40oc4znc0unzfjljmtlju4lju3lteumt  yuodytms43nc4yls4zos4zos0unzkuntktms4xohmuntitmswunzytms41n2mumdgtljiumi0umzku  my0untlxmi42ms01lji4lduumi0xmc41ogwumzutljy5tdqyljm5lde0bdeuntmtmy4xm0eumtgumt  gsmcwwldasndmuotesmtaunjvaii8%2Bpc9npjwvzz48l3n2zz4%3D for the full message or   use the non-minified dev environment for full errors and additional helpful w  arnings.
10:16:51 AM:   
10:16:51 AM:   - static-entry.js:263 
10:16:51 AM:     avodynamics/.cache/static-entry.js:263:20
10:16:51 AM:   
10:16:51 AM: 
10:16:52 AM: ​
10:16:52 AM: ────────────────────────────────────────────────────────────────
10:16:52 AM:   "build.command" failed                                        
10:16:52 AM: ────────────────────────────────────────────────────────────────
10:16:52 AM: ​
10:16:52 AM:   Error message
10:16:52 AM:   Command failed with exit code 1: npm run build
10:16:52 AM: ​
10:16:52 AM:   Error location
10:16:52 AM:   In Build command from Netlify app:
10:16:52 AM:   npm run build
10:16:52 AM: ​
10:16:52 AM:   Resolved config
10:16:52 AM:   build:
10:16:52 AM:     command: npm run build
10:16:52 AM:     commandOrigin: ui
10:16:52 AM:     environment:
10:16:52 AM:       - NODE_ENV
10:16:52 AM:       - NPM_VERSION
10:16:52 AM:     publish: /opt/build/repo/public
10:16:52 AM: Caching artifacts
10:16:52 AM: Started saving node modules
10:16:52 AM: Finished saving node modules
10:16:52 AM: Started saving build plugins
10:16:52 AM: Finished saving build plugins
10:16:52 AM: Started saving pip cache
10:16:52 AM: Finished saving pip cache
10:16:52 AM: Started saving emacs cask dependencies
10:16:52 AM: Finished saving emacs cask dependencies
10:16:52 AM: Started saving maven dependencies
10:16:52 AM: Finished saving maven dependencies
10:16:52 AM: Started saving boot dependencies
10:16:52 AM: Finished saving boot dependencies
10:16:52 AM: Started saving rust rustup cache
10:16:52 AM: Finished saving rust rustup cache
10:16:52 AM: Started saving go dependencies
10:16:52 AM: Finished saving go dependencies
10:16:56 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:16:56 AM: Creating deploy upload records
10:16:56 AM: Failing build: Failed to build site
10:16:56 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2
10:16:56 AM: Finished processing build request in 2m5.462046808s

this is very strange!

what happens when you remove the 404 page and the references to it for testing? are you able to get a working deploy that way? we seem to be getting stuck on that specific page/route for some reason, so i wonder if we can figure out why.

Just gave it a shot, it just fails on the next route. I linked the repo is anyone wants to take a look, I’ve been scouring support forms but it really seems to be a Netlify specific issue.

Hey there, @slourcey :wave:

It looks like this thread has been a bit quiet for the past few days. Can you confirm if you are still encountering this issue? If so, let me know and I can bring this back to our Gatsby expert. If you are no longer experiencing issues, please share what your solution was.

Look forward to hearing from you!

Just wanted to update that this was a transient issue that was not netlify specific. There was an issue with one of the SVG loading packages that only presented itself when deployed, and only if used in a specific way. In the last year I haven’t seen it again.

Thanks @slourcey for this insight! People like you make the forums great :netliheart:

1 Like