Unable to build Gatsby site

The site: https://stoic-shockley-fdbb42.netlify.app/ - which I’m unable to update due to deployment/build failures.

I’m also unable to install Essential Gatsby as per the following:

11:09:09 PM: Build ready to start
11:11:14 PM: build-image version: 122b31996ccaffd45d820a452d6227f8312110cc (focal)
11:11:14 PM: build-image tag: v4.5.3
11:11:14 PM: buildbot version: 78fa31439ae896fe295f33a65f0dead5b4a56863
11:11:15 PM: Fetching cached dependencies
11:11:15 PM: Failed to fetch cache, continuing with build
11:11:15 PM: Starting to prepare the repo for build
11:11:15 PM: No cached dependencies found. Cloning fresh repo
11:11:15 PM: git clone https://github.com/QNecron/gatsby-ttt
11:11:17 PM: Preparing Git Reference refs/heads/main
11:11:18 PM: Parsing package.json dependencies
11:11:19 PM: Starting build script
11:11:19 PM: Installing dependencies
11:11:19 PM: Python version set to 2.7
11:11:19 PM: Downloading and installing node v16.14.0...
11:11:19 PM: Downloading https://nodejs.org/dist/v16.14.0/node-v16.14.0-linux-x64.tar.xz...
11:11:20 PM: Computing checksum with sha256sum
11:11:20 PM: Checksums matched!
11:11:28 PM: Now using node v16.14.0 (npm v8.3.1)
11:11:29 PM: Started restoring cached build plugins
11:11:29 PM: Finished restoring cached build plugins
11:11:29 PM: Attempting ruby version 2.7.2, read from environment
11:11:30 PM: Using ruby version 2.7.2
11:11:30 PM: Using PHP version 8.0
11:11:30 PM: Started restoring cached node modules
11:11:30 PM: Finished restoring cached node modules
11:11:30 PM: Installing NPM modules using NPM version 8.3.1
11:11:54 PM: npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
11:11:54 PM: npm WARN deprecated har-validator@5.1.5: this library is no longer supported
11:11:54 PM: npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
11:11:55 PM: npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
11:11:57 PM: npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
11:11:57 PM: npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
11:12:13 PM: npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
11:12:17 PM: npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
11:12:17 PM: npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
11:12:19 PM: npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
11:12:20 PM: npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
11:12:21 PM: npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
11:12:23 PM: npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
11:12:34 PM: 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.
11:12:47 PM: added 1939 packages, and audited 1940 packages in 1m
11:12:47 PM: 225 packages are looking for funding
11:12:47 PM:   run `npm fund` for details
11:12:47 PM: 36 vulnerabilities (16 moderate, 18 high, 2 critical)
11:12:47 PM: To address issues that do not require attention, run:
11:12:47 PM:   npm audit fix
11:12:47 PM: To address all issues (including breaking changes), run:
11:12:47 PM:   npm audit fix --force
11:12:47 PM: Run `npm audit` for details.
11:12:48 PM: NPM modules installed
11:12:48 PM: Started restoring cached go cache
11:12:48 PM: Finished restoring cached go cache
11:12:48 PM: go version go1.16.5 linux/amd64
11:12:48 PM: go version go1.16.5 linux/amd64
11:12:48 PM: Installing missing commands
11:12:48 PM: Verify run directory
11:12:49 PM: ​
11:12:49 PM: ────────────────────────────────────────────────────────────────
11:12:49 PM:   Netlify Build                                                 
11:12:49 PM: ────────────────────────────────────────────────────────────────
11:12:49 PM: ​
11:12:49 PM: ❯ Version
11:12:49 PM:   @netlify/build 26.4.0
11:12:49 PM: ​
11:12:49 PM: ❯ Flags
11:12:49 PM:   baseRelDir: true
11:12:49 PM:   buildId: 622836753489600009d22b69
11:12:49 PM:   deployId: 622836753489600009d22b6b
11:12:49 PM: ​
11:12:49 PM: ❯ Current directory
11:12:49 PM:   /opt/build/repo
11:12:49 PM: ​
11:12:49 PM: ❯ Config file
11:12:49 PM:   No config file was defined: using default values.
11:12:49 PM: ​
11:12:49 PM: ❯ Context
11:12:49 PM:   production
11:12:49 PM: ​
11:12:49 PM: ❯ Installing plugins
11:12:49 PM:    - @netlify/plugin-gatsby@1.0.3
11:13:02 PM: ​
11:13:02 PM: ❯ Loading plugins
11:13:02 PM:    - @netlify/plugin-gatsby@1.0.3 from Netlify app
11:13:02 PM: ​
11:13:02 PM: ❯ Outdated plugins
11:13:02 PM:    - @netlify/plugin-gatsby@1.0.3: latest version is 2.1.2
11:13:02 PM:      Migration guide: https://ntl.fyi/gatsby-plugin-migration
11:13:02 PM:      To upgrade this plugin, please uninstall and re-install it from the Netlify plugins directory (https://app.netlify.com/plugins)
11:13:03 PM: ​
11:13:03 PM: ────────────────────────────────────────────────────────────────
11:13:03 PM:   1. @netlify/plugin-gatsby (onPreBuild event)                  
11:13:03 PM: ────────────────────────────────────────────────────────────────
11:13:03 PM: ​
11:13:03 PM: No Gatsby cache found. Building fresh.
11:13:03 PM: Add `gatsby-plugin-netlify` to `gatsby-config.js` if you would like to support Gatsby redirects. 🎉
11:13:03 PM: ​
11:13:03 PM: (@netlify/plugin-gatsby onPreBuild completed in 9ms)
11:13:03 PM: ​
11:13:03 PM: ────────────────────────────────────────────────────────────────
11:13:03 PM:   2. Build command from Netlify app                             
11:13:03 PM: ────────────────────────────────────────────────────────────────
11:13:03 PM: ​
11:13:03 PM: $ npm run build
11:13:03 PM: > gatsby-starter-default@0.1.0 build
11:13:03 PM: > gatsby build
11:13:07 PM: success compile gatsby files - 2.008s
11:13:07 PM: success load gatsby config - 0.015s
11:13:07 PM: success load plugins - 0.439s
11:13:07 PM: success onPreInit - 0.005s
11:13:08 PM: success initialize cache - 0.523s
11:13:08 PM: success copy gatsby files - 0.316s
11:13:09 PM: success Compiling Gatsby Functions - 0.178s
11:13:09 PM: success onPreBootstrap - 0.691s
11:13:10 PM: success createSchemaCustomization - 0.093s
11:13:12 PM: success Checking for changed pages - 0.000s
11:13:12 PM: success source and transform nodes - 2.503s
11:13:13 PM: info Writing GraphQL type definitions to /opt/build/repo/.cache/schema.gql
11:13:15 PM: success building schema - 2.503s
11:13:31 PM: success createPages - 15.903s
11:13:32 PM: success createPagesStatefully - 1.398s
11:13:32 PM: info Total nodes: 3082, SitePage nodes: 2926 (use --verbose for breakdown)
11:13:32 PM: success Checking for changed pages - 0.001s
11:13:33 PM: success onPreExtractQueries - 0.000s
11:13:39 PM: success extract queries from components - 6.401s
11:13:39 PM: success write out redirect data - 0.005s
11:13:42 PM: success Build manifest and related icons - 2.416s
11:13:42 PM: success onPostBootstrap - 2.417s
11:13:42 PM: info bootstrap finished - 38.647s
11:13:42 PM: success write out requires - 0.023s
11:13:47 PM: DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
11:13:47 PM: Recommendation: math.div($size, 16)
11:13:47 PM: More info and automated migrator: https://sass-lang.com/d/slash-div
11:13:47 PM:   ╷
11:13:47 PM: 7 │     @return ($size / 16) + 0rem;
11:13:47 PM:   │              ^^^^^^^^^^
11:13:47 PM:   ╵
11:13:47 PM:     src/styles/functions/_rem.scss 7:14      rem()
11:13:47 PM:     src/styles/variables/_spacing.scss 1:11  @import
11:13:47 PM:     src/styles/_base.scss 9:9                @import
11:13:47 PM:     src/styles/style.scss 3:9                root stylesheet
11:15:13 PM: success Building production JavaScript and CSS bundles - 91.505s
11:15:18 PM: DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
11:15:18 PM: Recommendation: math.div($size, 16)
11:15:18 PM: More info and automated migrator: https://sass-lang.com/d/slash-div
11:15:18 PM:   ╷
11:15:18 PM: 7 │     @return ($size / 16) + 0rem;
11:15:18 PM:   │              ^^^^^^^^^^
11:15:18 PM:   ╵
11:15:18 PM:     src/styles/functions/_rem.scss 7:14      rem()
11:15:18 PM:     src/styles/variables/_spacing.scss 1:11  @import
11:15:18 PM:     src/styles/_base.scss 9:9                @import
11:15:18 PM:     src/styles/style.scss 3:9                root stylesheet
11:15:43 PM: success Building HTML renderer - 29.720s
11:15:43 PM: success Execute page configs - 0.021s
11:15:43 PM: success Caching Webpack compilations - 0.001s
11:15:46 PM: success run queries in workers - 3.006s - 2929/2929 974.30/s
11:15:46 PM: success Merge worker state - 0.006s
11:15:46 PM: success Rewriting compilation hashes - 0.000s
11:15:46 PM: error UNHANDLED REJECTION Couldn't find temp query result for "/bestiary/scylla".
11:15:46 PM: 
11:15:46 PM:   Error: Couldn't find temp query result for "/bestiary/scylla".
  
11:15:46 PM:   - page-data.ts:104 readPageQueryResult
11:15:46 PM:     [repo]/[gatsby]/src/utils/page-data.ts:104:11
11:15:46 PM:   
11:15:46 PM:   - page-data.ts:121 writePageData
11:15:46 PM:     [repo]/[gatsby]/src/utils/page-data.ts:121:18
11:15:46 PM:   
11:15:46 PM:   - page-data.ts:232 
11:15:46 PM:     [repo]/[gatsby]/src/utils/page-data.ts:232:24
11:15:46 PM:   
11:15:46 PM: 
11:15:46 PM: not finished Writing page-data.json files to public directory - 0.235s
11:15:47 PM: ​
11:15:47 PM: ────────────────────────────────────────────────────────────────
11:15:47 PM:   "build.command" failed                                        
11:15:47 PM: ────────────────────────────────────────────────────────────────
11:15:47 PM: ​
11:15:47 PM:   Error message
11:15:47 PM:   Command failed with exit code 1: npm run build
11:15:47 PM: ​
11:15:47 PM:   Error location
11:15:47 PM:   In Build command from Netlify app:
11:15:47 PM:   npm run build
11:15:47 PM: ​
11:15:47 PM:   Resolved config
11:15:47 PM:   build:
11:15:47 PM:     command: npm run build
11:15:47 PM:     commandOrigin: ui
11:15:47 PM:     publish: /opt/build/repo/public
11:15:47 PM:     publishOrigin: ui
11:15:47 PM:   plugins:
11:15:47 PM:     - inputs: {}
11:15:47 PM:       origin: ui
11:15:47 PM:       package: '@netlify/plugin-gatsby'
11:15:47 PM: Caching artifacts
11:15:47 PM: Started saving node modules
11:15:47 PM: Finished saving node modules
11:15:47 PM: Started saving build plugins
11:15:47 PM: Finished saving build plugins
11:15:47 PM: Started saving pip cache
11:15:47 PM: Finished saving pip cache
11:15:47 PM: Started saving emacs cask dependencies
11:15:47 PM: Finished saving emacs cask dependencies
11:15:47 PM: Started saving maven dependencies
11:15:47 PM: Finished saving maven dependencies
11:15:47 PM: Started saving boot dependencies
11:15:47 PM: Finished saving boot dependencies
11:15:47 PM: Started saving rust rustup cache
11:15:47 PM: Finished saving rust rustup cache
11:15:47 PM: Started saving go dependencies
11:15:47 PM: Finished saving go dependencies
11:15:55 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:15:55 PM: Creating deploy upload records
11:15:56 PM: Failing build: Failed to build site
11:15:56 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
11:15:56 PM: Finished processing build request in 4m42.447194335s

There doesn’t appear to be anything special about the ‘scylla’ query, each time the build fails it just gives another monster entry at random (latest was ‘wood-golem for’ example).

Just recently, after I was unable to build, I updated Gatsby to version 4 along with several packages to latest just to see if that would help as I was running version 3. That didn’t seem to do anything but cause a different issue.

Public repo for pet project in question: GitHub - QNecron/gatsby-ttt: Tabletop Tools + Gatsby

Any help would be greatly appreciated!

Hey @QNecron

I cloned the repository and was able to deploy without issue. I made a slight change (to the footer) in order to force rebuilding of all pages, and this went without a hitch either. Build image is the same as yours.

Apparently making updates to the CSS (the last fix I was trying to push) didn’t constitute a rebuild of all the available pages, only the Initiative page.

After make a change as you did it all seems to work just fine, very odd. Not sure what happened but thank you for the suggestion.

1 Like

Thanks for coming back and letting us know! Glad everything is working now.