Gridsome Build fails (Yep, checked the other posts)

EDIT: working now - build command was no working locally, turns out the compiler was crashing due to two empty pages created as a placeholder

Hey guys/gals

Thanks in advance for taking the time to read this and help me. I’m trying to deploy a basic gridsome site from github. I’ve configured Netlify with the build command: gridsome build, and the publish directory as dist

When that failed I added a .toml file, both from a previous project and from your docs. The toml that I had previously worked on another site so its probably not at this level… But I also used one of yours to no avail either.

My package.json contains the JSON
"scripts": { "build": "gridsome build", "develop": "gridsome develop", "explore": "gridsome explore" },

While checking this I also tried changing the site name to epic-easley-321669.netlify.app which is my Netlify site name

Heres where things look like the go off the rails:

Heres my build log as well (hope it formats nicely, if not see 9:11:48 PM):

9:10:53 PM: Build ready to start
9:10:54 PM: build-image version: b0258b965567defc4a2d7e2f2dec2e00c8f73ad6
9:10:54 PM: build-image tag: v3.4.1
9:10:54 PM: buildbot version: 9042ba4998dab698f1f37fb8d36912c08a387191
9:10:55 PM: Fetching cached dependencies
9:10:55 PM: Failed to fetch cache, continuing with build
9:10:55 PM: Starting to prepare the repo for build
9:10:55 PM: No cached dependencies found. Cloning fresh repo
9:10:55 PM: git clone https://github.com/Joshfairhead/JoshAFairhead.com
9:10:56 PM: Preparing Git Reference refs/heads/master
9:10:57 PM: Starting build script
9:10:57 PM: Installing dependencies
9:10:57 PM: Python version set to 2.7
9:10:58 PM: Downloading and installing node v10.22.0...
9:10:58 PM: Downloading https://nodejs.org/dist/v10.22.0/node-v10.22.0-linux-x64.tar.xz...
9:10:59 PM: Computing checksum with sha256sum
9:10:59 PM: Checksums matched!
9:11:01 PM: Now using node v10.22.0 (npm v6.14.6)
9:11:01 PM: Started restoring cached build plugins
9:11:01 PM: Finished restoring cached build plugins
9:11:02 PM: Attempting ruby version 2.7.1, read from environment
9:11:03 PM: Using ruby version 2.7.1
9:11:03 PM: Using PHP version 5.6
9:11:03 PM: 5.2 is already installed.
9:11:03 PM: Using Swift version 5.2
9:11:03 PM: Started restoring cached node modules
9:11:03 PM: Finished restoring cached node modules
9:11:03 PM: Installing NPM modules using NPM version 6.14.6
9:11:24 PM: > sharp@0.25.3 install /opt/build/repo/node_modules/sharp
9:11:24 PM: > (node install/libvips && node install/dll-copy && prebuild-install --runtime=napi) || (node-gyp rebuild && node install/dll-copy)
9:11:24 PM: info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.9.1/libvips-8.9.1-linux-x64.tar.gz
9:11:26 PM: > node-sass@4.14.1 install /opt/build/repo/node_modules/node-sass
9:11:26 PM: > node scripts/install.js
9:11:27 PM: Downloading binary from https://github.com/sass/node-sass/releases/download/v4.14.1/linux-x64-64_binding.node
9:11:27 PM: Download complete
9:11:27 PM: Binary saved to /opt/build/repo/node_modules/node-sass/vendor/linux-x64-64/binding.node
9:11:27 PM: Caching binary to /opt/buildhome/.npm/node-sass/4.14.1/linux-x64-64_binding.node
9:11:27 PM: > core-js@3.6.5 postinstall /opt/build/repo/node_modules/core-js
9:11:27 PM: > node -e "try{require('./postinstall')}catch(e){}"
9:11:28 PM: > cwebp-bin@5.1.0 postinstall /opt/build/repo/node_modules/cwebp-bin
9:11:28 PM: > node lib/install.js
9:11:28 PM:   βœ” cwebp pre-build test passed successfully
9:11:28 PM: > mozjpeg@6.0.1 postinstall /opt/build/repo/node_modules/mozjpeg
9:11:28 PM: > node lib/install.js
9:11:29 PM:   βœ” mozjpeg pre-build test passed successfully
9:11:29 PM: > pngquant-bin@5.0.2 postinstall /opt/build/repo/node_modules/pngquant-bin
9:11:29 PM: > node lib/install.js
9:11:29 PM:   βœ” pngquant pre-build test passed successfully
9:11:29 PM: > node-sass@4.14.1 postinstall /opt/build/repo/node_modules/node-sass
9:11:29 PM: > node scripts/build.js
9:11:29 PM: Binary found at /opt/build/repo/node_modules/node-sass/vendor/linux-x64-64/binding.node
9:11:29 PM: Testing binary
9:11:29 PM: Binary is fine
9:11:31 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/watchpack/node_modules/fsevents):
9:11:31 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
9:11:31 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
9:11:31 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
9:11:31 PM: added 1486 packages from 749 contributors and audited 1491 packages in 26.393s
9:11:32 PM: 46 packages are looking for funding
9:11:32 PM:   run `npm fund` for details
9:11:32 PM: found 357 vulnerabilities (354 low, 3 high)
9:11:32 PM:   run `npm audit fix` to fix them, or `npm audit` for details
9:11:32 PM: NPM modules installed
9:11:32 PM: Started restoring cached go cache
9:11:32 PM: Finished restoring cached go cache
9:11:32 PM: go version go1.14.4 linux/amd64
9:11:32 PM: go version go1.14.4 linux/amd64
9:11:32 PM: Installing missing commands
9:11:32 PM: Verify run directory
9:11:33 PM: ​
9:11:33 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
9:11:33 PM: β”‚        Netlify Build        β”‚
9:11:33 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
9:11:33 PM: ​
9:11:33 PM: ❯ Version
9:11:33 PM:   @netlify/build 3.1.10
9:11:33 PM: ​
9:11:33 PM: ❯ Flags
9:11:33 PM:   deployId: 5f3992cd309c3e0007aede05
9:11:33 PM:   mode: buildbot
9:11:33 PM:   timersFile: /tmp/substage_times.txt
9:11:33 PM: ​
9:11:33 PM: ❯ Current directory
9:11:33 PM:   /opt/build/repo
9:11:33 PM: ​
9:11:33 PM: ❯ Config file
9:11:33 PM:   /opt/build/repo/netlify.toml
9:11:33 PM: ​
9:11:33 PM: ❯ Context
9:11:33 PM:   production
9:11:33 PM: ​
9:11:33 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
9:11:33 PM: β”‚ 1. build.command from netlify.toml β”‚
9:11:33 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
9:11:33 PM: ​
9:11:33 PM: $ gridsome build
9:11:34 PM: Gridsome v0.7.17
9:11:35 PM: Initializing plugins...
9:11:35 PM: Load sources - 0s
9:11:35 PM: Create GraphQL schema - 0.03s
9:11:35 PM: Create pages and templates - 0.08s
9:11:35 PM: Generate temporary code - 0.04s
9:11:35 PM: Bootstrap finish - 0.82s
9:11:35 PM: Compiling assets...
9:11:39 PM:    ⚠️  Tailwind is not purging unused styles because no template paths have been provided.
9:11:39 PM:       If you have manually configured PurgeCSS outside of Tailwind or are deliberately not
9:11:39 PM:       removing unused styles, set `purge: false` in your Tailwind config file to silence
9:11:39 PM:       this warning.
9:11:39 PM:    
9:11:39 PM:       https://tailwindcss.com/docs/controlling-file-size/#removing-unused-css
9:11:41 PM:    ⚠️  Tailwind is not purging unused styles because no template paths have been provided.
9:11:41 PM:       If you have manually configured PurgeCSS outside of Tailwind or are deliberately not
9:11:41 PM:       removing unused styles, set `purge: false` in your Tailwind config file to silence
9:11:41 PM:       this warning.
9:11:41 PM:    
9:11:41 PM:       https://tailwindcss.com/docs/controlling-file-size/#removing-unused-css
9:11:42 PM:    ⚠️  Tailwind is not purging unused styles because no template paths have been provided.
9:11:42 PM:       If you have manually configured PurgeCSS outside of Tailwind or are deliberately not
9:11:42 PM:       removing unused styles, set `purge: false` in your Tailwind config file to silence
9:11:42 PM:       this warning.
9:11:42 PM:    
9:11:42 PM:       https://tailwindcss.com/docs/controlling-file-size/#removing-unused-css
9:11:43 PM:    ⚠️  Tailwind is not purging unused styles because no template paths have been provided.
9:11:43 PM:       If you have manually configured PurgeCSS outside of Tailwind or are deliberately not
9:11:43 PM:       removing unused styles, set `purge: false` in your Tailwind config file to silence
9:11:43 PM:       this warning.
9:11:43 PM:    
9:11:43 PM:       https://tailwindcss.com/docs/controlling-file-size/#removing-unused-css
9:11:43 PM:    ⚠️  Tailwind is not purging unused styles because no template paths have been provided.
9:11:43 PM:       If you have manually configured PurgeCSS outside of Tailwind or are deliberately not
9:11:43 PM:       removing unused styles, set `purge: false` in your Tailwind config file to silence
9:11:43 PM:       this warning.
9:11:43 PM:    
9:11:43 PM:       https://tailwindcss.com/docs/controlling-file-size/#removing-unused-css
9:11:43 PM:    ⚠️  Tailwind is not purging unused styles because no template paths have been provided.
9:11:43 PM:       If you have manually configured PurgeCSS outside of Tailwind or are deliberately not
9:11:43 PM:       removing unused styles, set `purge: false` in your Tailwind config file to silence
9:11:43 PM:       this warning.
9:11:43 PM:    
9:11:43 PM:       https://tailwindcss.com/docs/controlling-file-size/#removing-unused-css
9:11:48 PM: ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js):
9:11:48 PM: TypeError: Cannot read property 'undetermined' of null
9:11:48 PM:     at d.merge (/opt/build/repo/node_modules/purgecss/lib/purgecss.js:1:1767)
9:11:48 PM:     at new d (/opt/build/repo/node_modules/purgecss/lib/purgecss.js:1:1500)
9:11:48 PM:     at m (/opt/build/repo/node_modules/purgecss/lib/purgecss.js:1:3137)
9:11:48 PM:     at runLoaders (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:316:20)
9:11:48 PM:     at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:367:11
9:11:48 PM:     at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:233:18
9:11:48 PM:     at context.callback (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
9:11:48 PM:     at Promise.resolve.then.then.catch (/opt/build/repo/node_modules/postcss-loader/src/index.js:208:9)
9:11:48 PM: ​
9:11:48 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
9:11:48 PM: β”‚   "build.command" failed    β”‚
9:11:48 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
9:11:48 PM: ​
9:11:48 PM:   Error message
9:11:48 PM:   Command failed with exit code 1: gridsome build
9:11:48 PM: ​
9:11:48 PM:   Error location
9:11:48 PM:   In build.command from netlify.toml:
9:11:48 PM:   gridsome build
9:11:48 PM: ​
9:11:48 PM:   Resolved config
9:11:48 PM:   build:
9:11:48 PM:     command: gridsome build
9:11:48 PM:     commandOrigin: config
9:11:48 PM:     environment:
9:11:48 PM:       - NODE_VERSION
9:11:48 PM:     publish: /opt/build/repo/dist
9:11:48 PM: Caching artifacts
9:11:48 PM: Started saving node modules
9:11:48 PM: Finished saving node modules
9:11:48 PM: Started saving build plugins
9:11:48 PM: Finished saving build plugins
9:11:48 PM: Started saving pip cache
9:11:48 PM: Finished saving pip cache
9:11:48 PM: Started saving emacs cask dependencies
9:11:48 PM: Finished saving emacs cask dependencies
9:11:48 PM: Started saving maven dependencies
9:11:48 PM: Finished saving maven dependencies
9:11:48 PM: Started saving boot dependencies
9:11:48 PM: Finished saving boot dependencies
9:11:48 PM: Started saving go dependencies
9:11:48 PM: Finished saving go dependencies
9:11:51 PM: Error running command: Build script returned non-zero exit code: 1
9:11:51 PM: Failing build: Failed to build site
9:11:51 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1
9:11:52 PM: Finished processing build request in 57.053062526s

All help appreciated! Thanks :slight_smile:

1 Like

Thanks for taking the time to updating this with the solution, @JoshAFairhead. We appreciate it! :+1:

I’m facing this error, can you please elaborate on β€œtwo empty pages created as a placeholder”?

Hey @GonzaloHirschToptal ,

Could you start a new forums thread for your issue, or give more details on what’s happening for you? Thank you! :slightly_smiling_face:

@audrey apologies for the delayed response. A coworker was doing some really shady stuff on the repository I was getting this error, but solving other problems seem to have made it work. Cheers :slight_smile:

1 Like

Glad everything is working now, @GonzaloHirschToptal! Happy building :netliconfetti: