netlify/netlify-plugin-gatsby

[Bug]: Netlify Gatsby plugin causes build failures on Gatsby 2.x site

Closed this issue ยท 7 comments

Summary

I see that you have left the 1.0.3 version of the netlify gatsby plugin accessible to older Gatsby sites, per plugins.json.

But I think you set this version exception too low, and the exception should instead be "gatsby": "<3.0.0", per this PR.

I noticed this because my v2 gatsby site that has been building fine for a few years started failing today.

Steps to reproduce

Try building a gatsby site < v3 (the screenshot is for gatsby 2.23.14)

image

A link to a reproduction repository

No response

Plugin version

3.5.1

More information about your build

  • I am building using the CLI
  • I am building using file-based configuration (netlify.toml)

What OS are you using?

None

Your netlify.toml file

No response

Configuration

No response

Environment

No response

Gatsby info

gatsby 2.23.14

Your _redirects file

No response

Builds logs (or link to your logs)

https://app.netlify.com/teams/emcwebmaster71/builds/63dc673f2281a7737627e527

Function logs

No response

I had a similar issue. Netlify deployments were broken.

Gatsby version: 2.24.91

Solved it by installing @gatsbyjs/reach-router
yarn add @gatsbyjs/reach-router

Yep, my build is broken as well.

Here's the entire log:

8:47:14 AM: build-image version: f40c5967c3e09a056e8b79397ce4f1c76d0df777 (focal)
8:47:14 AM: buildbot version: f40c5967c3e09a056e8b79397ce4f1c76d0df777
8:47:15 AM: Fetching cached dependencies
8:47:15 AM: Starting to download cache of 180.2MB
8:47:17 AM: Finished downloading cache in 2.154s
8:47:17 AM: Starting to extract cache
8:47:20 AM: Finished extracting cache in 2.953s
8:47:20 AM: Finished fetching cache in 5.152s
8:47:20 AM: Starting to prepare the repo for build
8:47:20 AM: Preparing Git Reference refs/heads/master
8:47:20 AM: Parsing package.json dependencies
8:47:22 AM: Starting build script
8:47:22 AM: Installing dependencies
8:47:22 AM: Python version set to 2.7
8:47:22 AM: Started restoring cached Node.js version
8:47:23 AM: Finished restoring cached Node.js version
8:47:23 AM: Attempting Node.js version 'v14.15.1' from .nvmrc
8:47:23 AM: v14.15.1 is already installed.
8:47:24 AM: Now using node v14.15.1 (npm v6.14.8)
8:47:24 AM: Started restoring cached build plugins
8:47:24 AM: Finished restoring cached build plugins
8:47:24 AM: Attempting Ruby version 2.6.2, read from environment
8:47:24 AM: Started restoring cached Ruby version
8:47:24 AM: Finished restoring cached Ruby version
8:47:24 AM: Using Ruby version 2.6.2
8:47:25 AM: Using PHP version 8.0
8:47:25 AM: Started restoring cached corepack dependencies
8:47:25 AM: mv: cannot move '/opt/build/cache/.node/corepack' to '/opt/buildhome/.node/corepack': No such file or directory
8:47:25 AM: Finished restoring cached corepack dependencies
8:47:25 AM: No npm workspaces detected
8:47:25 AM: Started restoring cached node modules
8:47:25 AM: Finished restoring cached node modules
8:47:25 AM: Bypassing sha validation. Running pre & post install scripts
8:47:25 AM: Installing npm packages using npm version 6.14.8
8:47:42 AM: npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
8:47:42 AM: npm WARN deprecated har-validator@5.1.5: this library is no longer supported
8:47:47 AM: > sharp@0.23.4 install /opt/build/repo/node_modules/sharp
8:47:47 AM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
8:47:49 AM: info sharp Detected globally-installed libvips v8.9.1
8:47:49 AM: info sharp Building from source via node-gyp
8:47:52 AM: make: Entering directory '/opt/build/repo/node_modules/sharp/build'
8:47:52 AM:   TOUCH Release/obj.target/libvips-cpp.stamp
8:47:52 AM:   CXX(target) Release/obj.target/sharp/src/common.o
8:47:54 AM:   CXX(target) Release/obj.target/sharp/src/metadata.o
8:47:55 AM:   CXX(target) Release/obj.target/sharp/src/stats.o
8:47:57 AM:   CXX(target) Release/obj.target/sharp/src/operations.o
8:47:58 AM:   CXX(target) Release/obj.target/sharp/src/pipeline.o
8:48:01 AM:   CXX(target) Release/obj.target/sharp/src/sharp.o
8:48:02 AM:   CXX(target) Release/obj.target/sharp/src/utilities.o
8:48:03 AM:   SOLINK_MODULE(target) Release/obj.target/sharp.node
8:48:03 AM:   COPY Release/sharp.node
8:48:03 AM: make: Leaving directory '/opt/build/repo/node_modules/sharp/build'
8:48:05 AM: npm WARN babel-preset-gatsby@0.9.0 requires a peer of core-js@^3.0.0 but none is installed. You must install peer dependencies yourself.
8:48:05 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.
8:48:05 AM: npm WARN tsutils@3.17.1 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.
8:48:05 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/chokidar/node_modules/fsevents):
8:48:05 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
8:48:05 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/watchpack/node_modules/fsevents):
8:48:05 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
8:48:05 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
8:48:05 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
8:48:05 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/gatsby/node_modules/fsevents):
8:48:05 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
8:48:05 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/gatsby-recipes/node_modules/fsevents):
8:48:05 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
8:48:05 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/gatsby-plugin-page-creator/node_modules/fsevents):
8:48:05 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
8:48:05 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/gatsby-page-utils/node_modules/fsevents):
8:48:05 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
8:48:05 AM: added 37 packages from 57 contributors, removed 87 packages, updated 170 packages, moved 1 package and audited 2479 packages in 39.464s
8:48:05 AM: 176 packages are looking for funding
8:48:05 AM:   run `npm fund` for details
8:48:05 AM: found 360 vulnerabilities (11 low, 145 moderate, 173 high, 31 critical)
8:48:05 AM:   run `npm audit fix` to fix them, or `npm audit` for details
8:48:05 AM: npm packages installed
8:48:06 AM: Started restoring cached go cache
8:48:06 AM: Finished restoring cached go cache
8:48:06 AM: Installing Go version 1.12 (requested 1.12)
8:48:10 AM: unset GOOS;
8:48:10 AM: unset GOARCH;
8:48:10 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
8:48:10 AM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
8:48:10 AM: go version >&2;
8:48:10 AM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.12.linux.amd64.env"
8:48:10 AM: go version go1.12 linux/amd64
8:48:10 AM: Detected 1 framework(s)
8:48:10 AM: "gatsby" at version "2.29.1"
8:48:10 AM: Installing missing commands
8:48:10 AM: Verify run directory
8:48:10 AM: Section completed: initializing
8:48:12 AM: โ€‹
8:48:12 AM:   Netlify Build                                                 
8:48:12 AM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
8:48:12 AM: โ€‹
8:48:12 AM: โฏ Version
8:48:12 AM:   @netlify/build 29.5.4
8:48:12 AM: โ€‹
8:48:12 AM: โฏ Flags
8:48:12 AM:   baseRelDir: true
8:48:12 AM:   buildId: 63dcbc01be0f8c0009f2f7b6
8:48:12 AM:   deployId: 63dcbc01be0f8c0009f2f7b8
8:48:12 AM: โ€‹
8:48:12 AM: โฏ Current directory
8:48:12 AM:   /opt/build/repo
8:48:12 AM: โ€‹
8:48:12 AM: โฏ Config file
8:48:12 AM:   No config file was defined: using default values.
8:48:12 AM: โ€‹
8:48:12 AM: โฏ Context
8:48:12 AM:   production
8:48:12 AM: โ€‹
8:48:12 AM: โฏ Installing plugins
8:48:12 AM:    - @netlify/plugin-gatsby@3.5.1
8:48:27 AM: โ€‹
8:48:27 AM: โฏ Loading plugins
8:48:27 AM:    - @netlify/plugin-gatsby@3.5.1 from undefined
8:48:29 AM: โ€‹
8:48:29 AM:   Plugin "@netlify/plugin-gatsby" internal error                
8:48:29 AM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
8:48:29 AM: โ€‹
8:48:29 AM:   Error message
8:48:29 AM:   Could not import plugin:
8:48:29 AM:   Error: Cannot find module '@gatsbyjs/reach-router'
8:48:29 AM:   Require stack:
8:48:29 AM:   - /opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-gatsby/lib/templates/api/gatsbyFunction.js
8:48:29 AM:   - /opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-gatsby/lib/templates/handlers.js
8:48:29 AM:   - /opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-gatsby/lib/helpers/functions.js
8:48:29 AM:   - /opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-gatsby/lib/index.js
8:48:29 AM: โ€‹
8:48:29 AM:   Plugin details
8:48:29 AM:   Package:        @netlify/plugin-gatsby
8:48:29 AM:   Version:        3.5.1
8:48:29 AM:   Repository:     git+https://github.com/netlify/netlify-plugin-gatsby.git
8:48:29 AM: Failed during stage 'building site': Build script returned non-zero exit code: 3 (https://ntl.fyi/exit-code-3)
8:48:29 AM:   npm link:       https://www.npmjs.com/package/@netlify/plugin-gatsby
8:48:29 AM:   Report issues:  https://github.com/netlify/netlify-plugin-gatsby/issues
8:48:29 AM: โ€‹
8:48:29 AM:   Error location
8:48:29 AM:   While loading "@netlify/plugin-gatsby" from undefined
8:48:29 AM:       at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
8:48:29 AM:       at Function.Module._load (node:internal/modules/cjs/loader:841:27)
8:48:29 AM:       at Module.require (node:internal/modules/cjs/loader:1067:19)
8:48:29 AM:       at require (node:internal/modules/cjs/helpers:103:18)
8:48:29 AM:       at Object.<anonymous> (/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-gatsby/lib/templates/api/gatsbyFunction.js:10:24)
8:48:29 AM:       at Module._compile (node:internal/modules/cjs/loader:1165:14)
8:48:29 AM:       at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
8:48:29 AM:       at Module.load (node:internal/modules/cjs/loader:1043:32)
8:48:29 AM:       at Function.Module._load (node:internal/modules/cjs/loader:878:12)
8:48:29 AM:       at Module.require (node:internal/modules/cjs/loader:1067:19)
8:48:29 AM: โ€‹
8:48:29 AM:   Error properties
8:48:29 AM:   { code: 'MODULE_NOT_FOUND' }
8:48:29 AM: โ€‹
8:48:29 AM:   Resolved config
8:48:29 AM:   build:
8:48:29 AM:     command: gatsby build
8:48:29 AM:     commandOrigin: ui
8:48:29 AM:     publish: /opt/build/repo/public
8:48:29 AM:     publishOrigin: ui
8:48:29 AM:   plugins:
8:48:29 AM:     - inputs: {}
8:48:29 AM:       package: '@netlify/plugin-gatsby'
8:48:29 AM: Caching artifacts
8:48:29 AM: Started saving node modules
8:48:29 AM: Finished saving node modules
8:48:29 AM: Started saving build plugins
8:48:29 AM: Finished saving build plugins
8:48:29 AM: Started saving pip cache
8:48:29 AM: Finished saving pip cache
8:48:29 AM: Started saving emacs cask dependencies
8:48:29 AM: Finished saving emacs cask dependencies
8:48:29 AM: Started saving maven dependencies
8:48:29 AM: Finished saving maven dependencies
8:48:29 AM: Started saving boot dependencies
8:48:29 AM: Finished saving boot dependencies
8:48:29 AM: Started saving rust rustup cache
8:48:29 AM: Finished saving rust rustup cache
8:48:29 AM: Started saving go dependencies
8:48:29 AM: Finished saving go dependencies
8:48:29 AM: Build failed due to a plugin error: Build script returned non-zero exit code: 3
8:48:29 AM: Failing build: Failed to build site
8:48:29 AM: Finished processing build request in 1m14.807s

I had a similar issue. Netlify deployments were broken.

Gatsby version: 2.24.91

Solved it by installing @gatsbyjs/reach-router yarn add @gatsbyjs/reach-router

Thanks, this works, for people using React 16, you can use this npm (in docs is 17 & 18 but works with 16 React)

https://www.npmjs.com/package/@gatsbyjs/reach-router/v/1.3.9

Thanks for the reports evenryone. The issue seems to be that it's trying to import the Gatsby Functions template, even in old versions of Gatsby that don't support it. That template uses the Gatsby reach-router fork that wasn't included in the old versions.

That did it. Thank you for the super fast fix. ๐Ÿš€

Thank you all for notifying us on this issue, we've pushed out a fix for the reach-router error here

I have similar problem and i am not programmer, I am using stackbit v1, contentful and after they deprecated v1, my sites stopped updating

2:38:26 PM: Build ready to start
2:38:40 PM: build-image version: 9495be345de05eb8e91837e5d92c5afd0dbd65f6 (focal)
2:38:40 PM: buildbot version: 9495be345de05eb8e91837e5d92c5afd0dbd65f6
2:38:40 PM: Building without cache
2:38:40 PM: Starting to prepare the repo for build
2:38:41 PM: No cached dependencies found. Cloning fresh repo
2:38:41 PM: git clone --filter=blob:none https://github.com/ibnhabib/interesting-neptune
2:38:41 PM: Preparing Git Reference refs/heads/master
2:38:41 PM: Parsing package.json dependencies
2:38:43 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'public' versus '' in the Netlify UI
2:38:43 PM: Different build command detected, going to use the one specified in the Netlify configuration file: './stackbit-build.sh' versus '' in the Netlify UI
2:38:43 PM: Starting build script
2:38:43 PM: Installing dependencies
2:38:43 PM: Python version set to 2.7
2:38:44 PM: Downloading and installing node v12.18.0...
2:38:44 PM: Downloading https://nodejs.org/dist/v12.18.0/node-v12.18.0-linux-x64.tar.xz...
2:40:53 PM: Computing checksum with sha256sum
2:40:53 PM: Checksums matched!
2:40:54 PM: Now using node v12.18.0 (npm v6.14.4)
2:40:54 PM: Started restoring cached build plugins
2:40:54 PM: Finished restoring cached build plugins
2:40:54 PM: Attempting Ruby version 2.7.1, read from environment
2:40:55 PM: Required ruby-2.7.1 is not installed - installing.
2:40:55 PM: Searching for binary rubies, this might take some time.
2:40:55 PM: Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/20.04/x86_64/ruby-2.7.1.tar.bz2
2:40:55 PM: Checking requirements for ubuntu.
2:40:55 PM: Requirements installation successful.
2:40:55 PM: ruby-2.7.1 - #configure
2:40:55 PM: ruby-2.7.1 - #download
2:40:55 PM: ruby-2.7.1 - #validate archive
2:40:59 PM: ruby-2.7.1 - #extract
2:41:01 PM: ruby-2.7.1 - #validate binary
2:41:01 PM: ruby-2.7.1 - #setup
2:41:02 PM: ruby-2.7.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.7.1@global
2:41:02 PM: ruby-2.7.1 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems........................................
2:41:02 PM: ruby-2.7.1 - #generating global wrappers........
2:41:02 PM: ruby-2.7.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.7.1
2:41:02 PM: ruby-2.7.1 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
2:41:02 PM: ruby-2.7.1 - #generating default wrappers........
2:41:02 PM: Using /opt/buildhome/.rvm/gems/ruby-2.7.1
2:41:03 PM: Using Ruby version 2.7.1
2:41:03 PM: Using PHP version 8.0
2:41:03 PM: Started restoring cached corepack dependencies
2:41:03 PM: Finished restoring cached corepack dependencies
2:41:03 PM: No npm workspaces detected
2:41:03 PM: Started restoring cached node modules
2:41:03 PM: Finished restoring cached node modules
2:41:03 PM: Bypassing sha validation. Running pre & post install scripts
2:41:03 PM: Installing npm packages using npm version 6.14.4
2:41:25 PM: > node-sass@4.14.0 install /opt/build/repo/node_modules/node-sass
2:41:25 PM: > node scripts/install.js
2:41:25 PM: Downloading binary from https://github.com/sass/node-sass/releases/download/v4.14.0/linux-x64-72_binding.node
2:41:26 PM: Download complete
2:41:26 PM: Binary saved to /opt/build/repo/node_modules/node-sass/vendor/linux-x64-72/binding.node
2:41:26 PM: Caching binary to /opt/buildhome/.npm/node-sass/4.14.0/linux-x64-72_binding.node
2:41:26 PM: > core-js@2.6.12 postinstall /opt/build/repo/node_modules/core-js
2:41:26 PM: > node -e "try{require('./postinstall')}catch(e){}"
2:41:26 PM: > core-js-pure@3.10.2 postinstall /opt/build/repo/node_modules/core-js-pure
2:41:26 PM: > node -e "try{require('./postinstall')}catch(e){}"
2:41:26 PM: > core-js@3.10.2 postinstall /opt/build/repo/node_modules/gatsby/node_modules/core-js
2:41:26 PM: > node -e "try{require('./postinstall')}catch(e){}"
2:41:27 PM: > gatsby-telemetry@1.10.1 postinstall /opt/build/repo/node_modules/gatsby-telemetry
2:41:27 PM: > node src/postinstall.js || true
2:41:27 PM: > gatsby-cli@2.19.2 postinstall /opt/build/repo/node_modules/gatsby/node_modules/gatsby-cli
2:41:27 PM: > node scripts/postinstall.js
2:41:27 PM: > gatsby@2.25.4 postinstall /opt/build/repo/node_modules/gatsby
2:41:27 PM: > node scripts/postinstall.js
2:41:27 PM: > node-sass@4.14.0 postinstall /opt/build/repo/node_modules/node-sass
2:41:27 PM: > node scripts/build.js
2:41:27 PM: Binary found at /opt/build/repo/node_modules/node-sass/vendor/linux-x64-72/binding.node
2:41:27 PM: Testing binary
2:41:27 PM: Binary is fine
2:41:29 PM: npm WARN azimuth@0.0.1 No repository field.
2:41:29 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
2:41:29 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2:41:29 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/watchpack/node_modules/fsevents):
2:41:29 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2:41:29 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
2:41:29 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2:41:29 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/babel-plugin-add-module-exports/node_modules/fsevents):
2:41:29 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2:41:29 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/gatsby/node_modules/fsevents):
2:41:29 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2:41:29 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/gatsby-recipes/node_modules/fsevents):
2:41:29 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2:41:29 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/gatsby-plugin-page-creator/node_modules/fsevents):
2:41:29 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2:41:29 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/gatsby-page-utils/node_modules/fsevents):
2:41:29 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2:41:29 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
2:41:29 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2:41:29 PM: added 2255 packages from 929 contributors and audited 2269 packages in 25.492s
2:41:30 PM: 200 packages are looking for funding
2:41:30 PM: run npm fund for details
2:41:30 PM: found 254 vulnerabilities (11 low, 77 moderate, 135 high, 31 critical)
2:41:30 PM: run npm audit fix to fix them, or npm audit for details
2:41:30 PM: npm packages installed
2:41:30 PM: Started restoring cached go cache
2:41:30 PM: Finished restoring cached go cache
2:41:30 PM: Installing Go version 1.14.4 (requested 1.14.4)
2:41:34 PM: go version go1.14.4 linux/amd64
2:41:34 PM: Detected 1 framework(s)
2:41:34 PM: "gatsby" at version "2.25.4"
2:41:34 PM: Installing missing commands
2:41:34 PM: Verify run directory
2:41:34 PM: Section completed: initializing
2:41:36 PM: โ€‹
2:41:36 PM: Netlify Build
2:41:36 PM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
2:41:36 PM: โ€‹
2:41:36 PM: โฏ Version
2:41:36 PM: @netlify/build 29.5.4
2:41:36 PM: โ€‹
2:41:36 PM: โฏ Flags
2:41:36 PM: baseRelDir: true
2:41:36 PM: buildId: 63e37ba25efcfd16f0e5ca7c
2:41:36 PM: deployId: 63e37ba25efcfd16f0e5ca7e
2:41:36 PM: โ€‹
2:41:36 PM: โฏ Current directory
2:41:36 PM: /opt/build/repo
2:41:36 PM: โ€‹
2:41:36 PM: โฏ Config file
2:41:36 PM: /opt/build/repo/netlify.toml
2:41:36 PM: โ€‹
2:41:36 PM: โฏ Context
2:41:36 PM: production
2:41:36 PM: โ€‹
2:41:36 PM: โฏ Installing plugins
2:41:36 PM: - netlify-plugin-amp-server-side-rendering@1.0.2
2:41:36 PM: - netlify-plugin-gatsby-cache@0.3.0
2:41:36 PM: - @netlify/plugin-lighthouse@4.0.7
2:41:36 PM: - netlify-plugin-image-optim@0.4.0
2:41:36 PM: - netlify-plugin-hashfiles@4.0.2
2:41:36 PM: - netlify-plugin-inline-critical-css@2.0.0
2:41:36 PM: - netlify-plugin-inline-source@1.0.4
2:41:36 PM: - @netlify/plugin-sitemap@0.8.1
2:41:36 PM: - netlify-plugin-minify-html@0.3.1
2:41:36 PM: - @netlify/plugin-gatsby@1.0.3
2:42:27 PM: โ€‹
2:42:27 PM: โฏ Loading plugins
2:42:27 PM: - netlify-plugin-amp-server-side-rendering@1.0.2 from Netlify app
2:42:27 PM: - netlify-plugin-gatsby-cache@0.3.0 from Netlify app
2:42:27 PM: - @netlify/plugin-lighthouse@4.0.7 from Netlify app
2:42:27 PM: - netlify-plugin-image-optim@0.4.0 from Netlify app
2:42:27 PM: - netlify-plugin-hashfiles@4.0.2 from Netlify app
2:42:27 PM: - netlify-plugin-inline-critical-css@2.0.0 from Netlify app
2:42:27 PM: - netlify-plugin-inline-source@1.0.4 from Netlify app
2:42:27 PM: - @netlify/plugin-sitemap@0.8.1 from Netlify app
2:42:27 PM: - netlify-plugin-minify-html@0.3.1 from Netlify app
2:42:27 PM: - @netlify/plugin-gatsby@1.0.3 from undefined
2:42:27 PM: โ€‹
2:42:27 PM: โฏ Outdated plugins
2:42:27 PM: - @netlify/plugin-gatsby@1.0.3: latest version is 3.5.1
2:42:27 PM: Migration guide: https://ntl.fyi/gatsby-plugin-migration
2:42:27 PM: To upgrade this plugin, please remove it from "netlify.toml" and install it from the Netlify plugins directory instead (https://app.netlify.com/plugins)
2:42:34 PM: โ€‹
2:42:34 PM: 1. netlify-plugin-gatsby-cache (onPreBuild event)
2:42:34 PM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
2:42:34 PM: โ€‹
2:42:34 PM: No Gatsby cache found. Building fresh.
2:42:34 PM: โ€‹
2:42:34 PM: (netlify-plugin-gatsby-cache onPreBuild completed in 7ms)
2:42:34 PM: โ€‹
2:42:34 PM: 2. @netlify/plugin-gatsby (onPreBuild event)
2:42:34 PM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
2:42:34 PM: โ€‹
2:42:34 PM: No Gatsby cache found. Building fresh.
2:42:34 PM: โ€‹
2:42:34 PM: Plugin "@netlify/plugin-gatsby" failed
2:42:34 PM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
2:42:34 PM: โ€‹
2:42:34 PM: Error message
2:42:34 PM: Error: Could not load gatsby-config.js
2:42:34 PM: Cannot find module './site-metadata.json'
2:42:34 PM: Require stack:
2:42:34 PM: - /opt/build/repo/gatsby-config.js
2:42:34 PM: - /opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-gatsby/src/index.js
2:42:34 PM: โ€‹
2:42:34 PM: Plugin details
2:42:34 PM: Package: @netlify/plugin-gatsby
2:42:34 PM: Version: 1.0.3
2:42:34 PM: Repository: git+https://github.com/netlify/netlify-plugin-gatsby.git
2:42:34 PM: npm link: https://www.npmjs.com/package/@netlify/plugin-gatsby
2:42:34 PM: Report issues: https://github.com/netlify/netlify-plugin-gatsby/issues
2:42:34 PM: โ€‹
2:42:34 PM: Error location
2:42:34 PM: In "onPreBuild" event in "@netlify/plugin-gatsby" from undefined
2:42:34 PM: โ€‹
2:42:34 PM: Resolved config
2:42:34 PM: build:
2:42:34 PM: command: ./stackbit-build.sh
2:42:34 PM: commandOrigin: config
2:42:34 PM: environment:
2:42:34 PM: - CONTENTFUL_ACCESS_TOKEN
2:42:34 PM: - CONTENTFUL_DELIVERY_TOKEN
2:42:34 PM: - CONTENTFUL_SPACE_ID
2:42:34 PM: - NETLIFY_GRAPH_TOKEN
2:42:34 PM: - ONEGRAPH_AUTHLIFY_TOKEN
2:42:34 PM: - STACKBIT_API_KEY
2:42:34 PM: publish: /opt/build/repo/public
2:42:34 PM: publishOrigin: config
2:42:34 PM: plugins:
2:42:34 PM: - inputs: {}
2:42:34 PM: origin: ui
2:42:34 PM: package: netlify-plugin-amp-server-side-rendering
2:42:34 PM: - inputs: {}
2:42:34 PM: origin: ui
2:42:36 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
2:42:34 PM: package: netlify-plugin-gatsby-cache
2:42:34 PM: - inputs: {}
2:42:34 PM: origin: ui
2:42:34 PM: package: '@netlify/plugin-lighthouse'
2:42:34 PM: - inputs: {}
2:42:34 PM: origin: ui
2:42:34 PM: package: netlify-plugin-image-optim
2:42:34 PM: - inputs: {}
2:42:34 PM: origin: ui
2:42:34 PM: package: netlify-plugin-hashfiles
2:42:34 PM: - inputs: {}
2:42:34 PM: origin: ui
2:42:34 PM: package: netlify-plugin-inline-critical-css
2:42:34 PM: - inputs: {}
2:42:34 PM: origin: ui
2:42:34 PM: package: netlify-plugin-inline-source
2:42:34 PM: - inputs: {}
2:42:34 PM: origin: ui
2:42:34 PM: package: '@netlify/plugin-sitemap'
2:42:34 PM: - inputs: {}
2:42:34 PM: origin: ui
2:42:34 PM: package: netlify-plugin-minify-html
2:42:34 PM: - inputs: {}
2:42:34 PM: package: '@netlify/plugin-gatsby'
2:42:34 PM: Caching artifacts
2:42:34 PM: Started saving node modules
2:42:34 PM: Finished saving node modules
2:42:34 PM: Started saving build plugins
2:42:34 PM: Finished saving build plugins
2:42:34 PM: Started saving corepack cache
2:42:34 PM: Finished saving corepack cache
2:42:34 PM: Started saving pip cache
2:42:34 PM: Finished saving pip cache
2:42:34 PM: Started saving emacs cask dependencies
2:42:34 PM: Finished saving emacs cask dependencies
2:42:34 PM: Started saving maven dependencies
2:42:34 PM: Finished saving maven dependencies
2:42:34 PM: Started saving boot dependencies
2:42:34 PM: Finished saving boot dependencies
2:42:34 PM: Started saving rust rustup cache
2:42:34 PM: Finished saving rust rustup cache
2:42:34 PM: Started saving go dependencies
2:42:34 PM: Finished saving go dependencies
2:42:36 PM: Cached Ruby version 2.7.1
2:42:36 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:42:36 PM: Failing build: Failed to build site
2:42:36 PM: Finished processing build request in 3m55.43s