Home
Support Forums

Gridsome build failing

Hello

I can’t figure out why my site https://hungry-bohr-ad3548.netlify.app

Won’t deploy. The deploy log is below.

Jay

Deploy log

8:30:47 PM: Build ready to start

8:30:49 PM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68

8:30:49 PM: build-image tag: v3.6.1

8:30:49 PM: buildbot version: d35018babe252245044d3565f193fa426818b4b1

8:30:49 PM: Fetching cached dependencies

8:30:49 PM: Failed to fetch cache, continuing with build

8:30:49 PM: Starting to prepare the repo for build

8:30:50 PM: No cached dependencies found. Cloning fresh repo

8:30:50 PM: git clone https://github.com/mrjaypeasmith/lucyfoulkes

8:30:51 PM: Preparing Git Reference refs/heads/main

8:30:52 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'dist' versus 'dist/' in the Netlify UI

8:30:53 PM: Starting build script

8:30:53 PM: Installing dependencies

8:30:53 PM: Python version set to 2.7

8:30:54 PM: v12.18.0 is already installed.

8:30:55 PM: Now using node v12.18.0 (npm v6.14.4)

8:30:55 PM: Started restoring cached build plugins

8:30:55 PM: Finished restoring cached build plugins

8:30:55 PM: Attempting ruby version 2.7.1, read from environment

8:30:56 PM: Using ruby version 2.7.1

8:30:56 PM: Using PHP version 5.6

8:30:56 PM: Started restoring cached node modules

8:30:56 PM: Finished restoring cached node modules

8:30:56 PM: Started restoring cached yarn cache

8:30:56 PM: Finished restoring cached yarn cache

8:30:56 PM: Installing yarn at version 1.22.4

8:30:56 PM: Installing Yarn!

8:30:56 PM: > Downloading tarball...

8:30:56 PM: [1/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz --> /tmp/yarn.tar.gz.28HEtBUhkn

8:30:56 PM: % Total % Received % Xferd Average Speed Time Time Time Current

8:30:56 PM: Dload Upload Total Spent Left Speed

8:30:57 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

8:30:57 PM: 100 80 100 80 0 0 391 0 --:--:-- --:--:-- --:--:-- 392

8:30:57 PM: 100 93 100 93 0 0 174 0 --:--:-- --:--:-- --:--:-- 174

8:30:57 PM: 100 625 100 625 0 0 732 0 --:--:-- --:--:-- --:--:-- 732

8:30:58 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

8:30:58 PM: 100 1215k 100 1215k 0 0 956k 0 0:00:01 0:00:01 --:--:-- 3896k

8:30:58 PM: [2/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz.asc --> /tmp/yarn.tar.gz.28HEtBUhkn.asc

8:30:58 PM: 100 84 100 84 0 0 1714 0 --:--:-- --:--:-- --:--:-- 1714

8:30:58 PM: 100 97 100 97 0 0 1266 0 --:--:-- --:--:-- --:--:-- 1266

8:30:58 PM: 100 629 100 629 0 0 3667 0 --:--:-- --:--:-- --:--:-- 3667

8:30:58 PM: 100 1028 100 1028 0 0 4863 0 --:--:-- --:--:-- --:--:-- 4863

8:30:58 PM: > Verifying integrity...

8:30:58 PM: gpg: Signature made Mon 09 Mar 2020 03:52:13 PM UTC using RSA key ID 69475BAA

8:30:58 PM: gpg: Good signature from "Yarn Packaging <yarn@dan.cx>"

8:30:58 PM: gpg: Note: This key has expired!

8:30:58 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310

8:30:58 PM: Subkey fingerprint: 6D98 490C 6F1A CDDD 448E 4595 4F77 6793 6947 5BAA

8:30:58 PM: > GPG signature looks good

8:30:58 PM: > Extracting to ~/.yarn...

8:30:58 PM: > Adding to $PATH...

8:30:58 PM: > Successfully installed Yarn 1.22.4! Please open another terminal where the `yarn` command will now be available.

8:30:59 PM: Installing NPM modules using Yarn version 1.22.4

8:30:59 PM: yarn install v1.22.4

8:30:59 PM: [1/4] Resolving packages...

8:31:00 PM: [2/4] Fetching packages...

8:31:04 PM: warning mini-css-extract-plugin@0.5.0: Invalid bin field for "mini-css-extract-plugin".

8:31:05 PM: warning url-loader@1.1.2: Invalid bin field for "url-loader".

8:31:20 PM: info fsevents@1.2.12: The platform "linux" is incompatible with this module.

8:31:20 PM: info "fsevents@1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation.

8:31:20 PM: [3/4] Linking dependencies...

8:31:20 PM: warning "gridsome-plugin-svg > vue-svg-loader@0.16.0" has unmet peer dependency "vue-template-compiler@^2.0.0".

8:31:20 PM: warning "gridsome-plugin-svg > vue-svg-loader > svg-to-vue@0.7.0" has unmet peer dependency "vue-template-compiler@^2.0.0".

8:31:29 PM: [4/4] Building fresh packages...

8:31:34 PM: Done in 34.70s.

8:31:34 PM: NPM modules installed using Yarn

8:31:34 PM: Started restoring cached go cache

8:31:34 PM: Finished restoring cached go cache

8:31:34 PM: go version go1.14.4 linux/amd64

8:31:34 PM: go version go1.14.4 linux/amd64

8:31:34 PM: Installing missing commands

8:31:34 PM: Verify run directory

8:31:36 PM: ​

8:31:36 PM: ────────────────────────────────────────────────────────────────

8:31:36 PM: Netlify Build

8:31:36 PM: ────────────────────────────────────────────────────────────────

8:31:36 PM: ​

8:31:36 PM: ❯ Version

8:31:36 PM: @netlify/build 9.0.0

8:31:36 PM: ​

8:31:36 PM: ❯ Flags

8:31:36 PM: deployId: 60204df7dc03780007759eec

8:31:36 PM: mode: buildbot

8:31:36 PM: ​

8:31:36 PM: ❯ Current directory

8:31:36 PM: /opt/build/repo

8:31:36 PM: ​

8:31:36 PM: ❯ Config file

8:31:36 PM: No config file was defined: using default values.

8:31:36 PM: ​

8:31:36 PM: ❯ Context

8:31:36 PM: production

8:31:36 PM: ​

8:31:36 PM: ────────────────────────────────────────────────────────────────

8:31:36 PM: 1. Build command from Netlify app

8:31:36 PM: ────────────────────────────`Preformatted text`────────────────────────────────────

8:31:36 PM: ​

8:31:36 PM: $ gridsome build

8:31:37 PM: Gridsome v0.7.23

8:31:38 PM: Initializing plugins...

8:31:38 PM: Error: Session not found

8:31:38 PM: at module.exports (/opt/build/repo/node_modules/gridsome-source-sanity/src/remoteGraphQLSchema.js:25:11)

8:31:38 PM: at processTicksAndRejections (internal/process/task_queues.js:97:5)

8:31:38 PM: ​

8:31:38 PM: ────────────────────────────────────────────────────────────────

8:31:38 PM: "build.command" failed

8:31:38 PM: ────────────────────────────────────────────────────────────────

8:31:38 PM: ​

8:31:38 PM: Error message

8:31:38 PM: Command failed with exit code 1: gridsome build

8:31:38 PM: ​

8:31:38 PM: Error location

8:31:38 PM: In Build command from Netlify app:

8:31:38 PM: gridsome build

8:31:38 PM: ​

8:31:38 PM: Resolved config

8:31:38 PM: build:

8:31:38 PM: command: gridsome build

8:31:38 PM: commandOrigin: ui

8:31:38 PM: publish: /opt/build/repo/dist

8:31:39 PM: Caching artifacts

8:31:39 PM: Started saving node modules

8:31:39 PM: Finished saving node modules

8:31:39 PM: Started saving build plugins

8:31:39 PM: Finished saving build plugins

8:31:39 PM: Started saving yarn cache

8:31:39 PM: Finished saving yarn cache

8:31:39 PM: Started saving pip cache

8:31:39 PM: Finished saving pip cache

8:31:39 PM: Started saving emacs cask dependencies

8:31:39 PM: Finished saving emacs cask dependencies

8:31:39 PM: Started saving maven dependencies

8:31:39 PM: Finished saving maven dependencies

8:31:39 PM: Started saving boot dependencies

8:31:39 PM: Finished saving boot dependencies

8:31:39 PM: Started saving rust rustup cache

8:31:39 PM: Finished saving rust rustup cache

8:31:39 PM: Started saving go dependencies

8:31:39 PM: Finished saving go dependencies

8:31:42 PM: Build failed due to a user error: Build script returned non-zero exit code: 2

8:31:42 PM: Failing build: Failed to build site

8:31:42 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2

8:31:42 PM: Finished processing build request in 52.835901912s

Hiya, sorry you are having trouble with your build.

This Support Guide contains a ton of useful debugging tips that can likely help you solve your problem :slight_smile:

We also recommend trying to search the forums with the build error you encountered - it’s likely your question was already asked by someone else!

If you are still having problems, please provide as much information as you can on what you have already tried, what your build settings are, your package.json, etc. Thanks!

I figured out what I was doing wrong - I hadn’t set my environment variables for Sanity in the Netlify config! Complete mistake on my end for being a n00b. Working PERFECTLY now!

1 Like

Hey there @mrjaypeasmith :wave:

Thank you so much for coming back and letting us know! This benefits future Forums users who may find themselves in a similar situation :slight_smile: