netlify / netlify-plugin-gatsby

A build plugin to integrate Gatsby seamlessly with Netlify

Home Page:https://www.npmjs.com/package/@netlify/plugin-gatsby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Build failing only once Essential Gatsby plugin installed: Failed during stage 'building site': Build script returned non-zero exit code: 1

satcreative opened this issue · comments

Summary

I have a Gatsby Netlify build which completes successfully without Essential Gatsby plugin installed but fails with it installed.

Steps to reproduce

  1. Install Essential Gatsby plugin within site
  2. Trigger deploy
  3. Deploy fails
  4. Uninstall Essential Gatsby plugin from site
  5. Trigger deploy
  6. Deploy succeeds

Plugin version

3.0.0

What OS are you using?

Mac OS

Configuration

`gatsby-config.js` and options
require("dotenv").config({
  path: ".env"
})
const {
  createHttpLink
} = require('apollo-link-http');
const fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args));
const store = require('store');
const sourceNodes = require('gatsby/dist/utils/source-nodes');

module.exports = {
  siteMetadata: {
    title: `Ionactive training`,
    description: `Online training platform`,
    author: `@Satellite`,
  },
  plugins: [
    `gatsby-plugin-react-helmet`,
    `gatsby-plugin-sass`,
    `gatsby-plugin-styled-components`,
    {
      resolve: "gatsby-plugin-firebase",
      options: {
        credentials: {
          apiKey: process.env.GATSBY_FIREBASE_API_KEY,
          authDomain: process.env.GATSBY_FIREBASE_AUTH_DOMAIN,
          databaseURL: process.env.GATSBY_FIREBASE_DATABASE_URL,
          projectId: process.env.GATSBY_FIREBASE_PROJECT_ID,
          storageBucket: process.env.GATSBY_FIREBASE_STORAGE_BUCKET,
          messagingSenderId: process.env.GATSBY_FIREBASE_MESSAGING_SENDER_ID,
          appId: process.env.GATSBY_FIREBASE_APP_ID
        }
      }
    },
    {
      resolve: "gatsby-source-graphql",
      options: {
        typeName: "Craft",
        fieldName: "craft",

        createLink: () =>
          createHttpLink({
            uri: process.env.GATSBY_CRAFTQL_URL,
            headers: {
              Authorization: `Bearer ${process.env.GATSBY_CRAFTQL_AUTH}`,
            },
            fetch: (uri, options) => {
              const token = store.get('X-Craft-Token');
              return fetch(
                `${uri}${token !== undefined ? `?token=${token}` : ''}`,
                options,
              );
            },
          }),
      },
    },
    {
      resolve: `gatsby-plugin-webfonts`,
      options: {
        fonts: {
          google: [{
            family: "Nunito",
            variants: ["400", "700"]
          }, ],
        },
      },
    },
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `images`,
        path: `${__dirname}/src/images`,
      },
    },
    {
      resolve: `gatsby-plugin-manifest`,
      options: {
        name: `Ionactive training`,
        short_name: `Ionactive`,
        start_url: `/`,
        background_color: `#FFE700`,
        theme_color: `#FFE700`,
        display: `minimal-ui`,
        icon: `src/images/logos/ionactive-icon.png`,
      },
    },
    `gatsby-plugin-react-svg`,
    `gatsby-plugin-netlify`,
    `gatsby-plugin-offline`,
  ],
  developMiddleware: app => {
    app.use('*', (req, res, next) => {
      if (req.query.token) {
        store.set('X-Craft-Token', req.query.token);
        createSchemaCustomization({
          refresh: true
        }).then(() => {
          sourceNodes({
            webhookBody
          })
        })
      }
      next();
    });
  },
}

Environment

Environment
System:
    OS: macOS 10.15.7
    CPU: (4) x64 Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz
    Memory: 447.87 MB / 32.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 16.14.0 - ~/.nvm/versions/node/v16.14.0/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 8.10.0 - ~/Documents/Sites/_repos/Ionactive assets/ionactive-training/node_modules/.bin/npm
  Browsers:
    Chrome: 101.0.4951.64
    Edge: 101.0.1210.47
    Firefox: 98.0.1
    Safari: 15.2

Gatsby info

gatsby info
 System:
    OS: macOS 10.15.7
    CPU: (4) x64 Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 16.14.0 - ~/.nvm/versions/node/v16.14.0/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 8.3.1 - ~/.nvm/versions/node/v16.14.0/bin/npm
  Languages:
    Python: 2.7.13 - /Applications/MAMP/Library/bin/python
  Browsers:
    Chrome: 101.0.4951.64
    Firefox: 98.0.1
    Safari: 15.2
  npmPackages:
    gatsby: ^4.7.2 => 4.13.1
    gatsby-cli: ^4.7.0 => 4.13.0
    gatsby-firesource: ^2.0.3 => 2.0.3
    gatsby-plugin-firebase: ^0.2.0-beta.4 => 0.2.0-beta.4
    gatsby-plugin-manifest: ^4.7.0 => 4.13.0
    gatsby-plugin-netlify: ^4.1.0 => 4.3.1
    gatsby-plugin-offline: ^5.7.0 => 5.13.0
    gatsby-plugin-react-helmet: ^5.7.0 => 5.13.0
    gatsby-plugin-react-svg: ^3.1.0 => 3.1.0
    gatsby-plugin-remote-images: ^3.3.0 => 3.4.0
    gatsby-plugin-sass: ^5.7.0 => 5.13.0
    gatsby-plugin-styled-components: ^5.7.0 => 5.13.0
    gatsby-plugin-webfonts: ^2.2.1 => 2.2.2
    gatsby-source-filesystem: ^4.7.0 => 4.13.0
    gatsby-source-graphql: ^4.7.0 => 4.13.0

Builds logs (or link to your logs)

Build logs: Failed with Essential Gatsby installed
10:09:51 AM: Build ready to start
10:09:53 AM: build-image version: d2c6dbeac570350a387d832f64bc980dc964ad65 (focal)
10:09:53 AM: build-image tag: v4.8.0
10:09:53 AM: buildbot version: 29e546ddee264a16af472b38ccba15b350150213
10:09:54 AM: Fetching cached dependencies
10:09:54 AM: Starting to download cache of 312.1MB
10:09:58 AM: Finished downloading cache in 4.199403336s
10:09:58 AM: Starting to extract cache
10:10:06 AM: Finished extracting cache in 8.359919153s
10:10:06 AM: Finished fetching cache in 12.602958002s
10:10:06 AM: Starting to prepare the repo for build
10:10:09 AM: Preparing Git Reference refs/heads/staging-revert
10:10:14 AM: Parsing package.json dependencies
10:10:16 AM: Starting build script
10:10:16 AM: Installing dependencies
10:10:16 AM: Python version set to 2.7
10:10:16 AM: Started restoring cached node version
10:10:17 AM: Finished restoring cached node version
10:10:17 AM: v16.14.0 is already installed.
10:10:17 AM: Now using node v16.14.0 (npm v8.3.1)
10:10:17 AM: Started restoring cached build plugins
10:10:17 AM: Finished restoring cached build plugins
10:10:18 AM: Attempting ruby version 2.7.2, read from environment
10:10:18 AM: Using ruby version 2.7.2
10:10:19 AM: Using PHP version 8.0
10:10:19 AM: No npm workspaces detected
10:10:19 AM: Started restoring cached node modules
10:10:19 AM: Finished restoring cached node modules
10:10:19 AM: Installing NPM modules using NPM version 8.3.1
10:10:38 AM: removed 69 packages, and audited 2452 packages in 19s
10:10:38 AM: 247 packages are looking for funding
10:10:38 AM:   run `npm fund` for details
10:10:39 AM: 54 vulnerabilities (10 moderate, 41 high, 3 critical)
10:10:39 AM: To address issues that do not require attention, run:
10:10:39 AM:   npm audit fix
10:10:39 AM: To address all issues possible (including breaking changes), run:
10:10:39 AM:   npm audit fix --force
10:10:39 AM: Some issues need review, and may require choosing
10:10:39 AM: a different dependency.
10:10:39 AM: Run `npm audit` for details.
10:10:39 AM: NPM modules installed
10:10:39 AM: Started restoring cached go cache
10:10:39 AM: Finished restoring cached go cache
10:10:39 AM: go version go1.16.5 linux/amd64
10:10:39 AM: go version go1.16.5 linux/amd64
10:10:39 AM: Installing missing commands
10:10:39 AM: Verify run directory
10:10:40 AM: ​
10:10:40 AM: ────────────────────────────────────────────────────────────────
10:10:40 AM:   Netlify Build                                                 
10:10:40 AM: ────────────────────────────────────────────────────────────────
10:10:40 AM: ​
10:10:40 AM: ❯ Version
10:10:40 AM:   @netlify/build 27.1.1
10:10:40 AM: ​
10:10:40 AM: ❯ Flags
10:10:40 AM:   baseRelDir: true
10:10:40 AM:   buildId: 6284b7df55a894000882968f
10:10:40 AM:   deployId: 6284b7df55a8940008829691
10:10:40 AM: ​
10:10:40 AM: ❯ Current directory
10:10:40 AM:   /opt/build/repo
10:10:40 AM: ​
10:10:40 AM: ❯ Config file
10:10:40 AM:   No config file was defined: using default values.
10:10:40 AM: ​
10:10:40 AM: ❯ Context
10:10:40 AM:   production
10:10:41 AM: ​
10:10:41 AM: ❯ Installing plugins
10:10:41 AM:    - @netlify/plugin-gatsby@3.0.0
10:10:52 AM: ​
10:10:52 AM: ❯ Loading plugins
10:10:52 AM:    - @netlify/plugin-gatsby@3.0.0 from Netlify app
10:10:54 AM: ​
10:10:54 AM: ────────────────────────────────────────────────────────────────
10:10:54 AM:   1. @netlify/plugin-gatsby (onPreBuild event)                  
10:10:54 AM: ────────────────────────────────────────────────────────────────
10:10:54 AM: ​
10:10:54 AM: No Gatsby cache found. Building fresh.
10:10:54 AM: ​
10:10:54 AM: (@netlify/plugin-gatsby onPreBuild completed in 508ms)
10:10:54 AM: ​
10:10:54 AM: ────────────────────────────────────────────────────────────────
10:10:54 AM:   2. Build command from Netlify app                             
10:10:54 AM: ────────────────────────────────────────────────────────────────
10:10:54 AM: ​
10:10:54 AM: $ gatsby build
10:10:57 AM: success compile gatsby files - 0.734s
10:10:57 AM: success load gatsby config - 0.036s
10:10:57 AM: success load plugins - 0.573s
10:10:57 AM: success onPreInit - 0.003s
10:10:57 AM: success initialize cache - 0.061s
10:10:57 AM: success copy gatsby files - 0.114s
10:10:58 AM: success Compiling Gatsby Functions - 0.196s
10:10:58 AM: success onPreBootstrap - 0.635s
10:11:04 AM: success createSchemaCustomization - 6.139s
10:11:04 AM: success Checking for changed pages - 0.000s
10:11:04 AM: success source and transform nodes - 0.263s
10:11:05 AM: info Writing GraphQL type definitions to /opt/build/repo/.cache/schema.gql
10:11:07 AM: success building schema - 2.449s
10:11:08 AM: success createPages - 0.811s
10:11:08 AM: success createPagesStatefully - 0.066s
10:11:08 AM: info Total nodes: 403, SitePage nodes: 335 (use --verbose for breakdown)
10:11:08 AM: success Checking for changed pages - 0.000s
10:11:08 AM: success onPreExtractQueries - 0.000s
10:11:21 AM: success extract queries from components - 13.393s
10:11:21 AM: success write out redirect data - 0.003s
10:11:22 AM: success Build manifest and related icons - 0.450s
10:11:22 AM: success onPostBootstrap - 0.451s
10:11:22 AM: info bootstrap finished - 27.587s
10:11:22 AM: success write out requires - 0.010s
10:12:08 AM: warning DefinePlugin
10:12:08 AM: Conflicting values for 'process.env'
10:12:08 AM: success Building production JavaScript and CSS bundles - 46.311s
10:12:33 AM: success Building HTML renderer - 24.926s
10:12:33 AM: success Execute page configs - 0.563s
10:12:33 AM: success Caching Webpack compilations - 0.000s
10:13:11 AM: success run queries in workers - 37.916s - 336/336 8.86/s
10:13:11 AM: success Merge worker state - 0.003s
10:13:11 AM: success Rewriting compilation hashes - 0.001s
10:13:20 AM: success Writing page-data.json files to public directory - 8.516s - 335/335 39.34/s
10:13:25 AM: warning Unsafe builtin method was used, future builds will need to rebuild all pages
10:13:26 AM: warning WebpackError: Unsafe builtin usage fs.readFileSync:
10:13:26 AM:     at gatsby-starter-hello-world/node_modules/dom-storage/lib/index.js:38:1
10:13:26 AM:     at gatsby-starter-hello-world/node_modules/@firebase/app/dist/index.node.cjs.js:658:1
10:13:26 AM:     at gatsby-starter-hello-world/webpack/bootstrap:19:1
10:13:26 AM:     at gatsby-starter-hello-world/node_modules/firebase/app/dist/index.cjs.js:3:16
10:13:26 AM:     at gatsby-starter-hello-world/webpack/bootstrap:19:1
10:13:26 AM:     at gatsby-starter-hello-world/webpack/bootstrap:19:1
10:13:26 AM:     at gatsby-starter-hello-world/.cache/api-runner-ssr.js:23:15
10:13:26 AM:     at gatsby-starter-hello-world/webpack/bootstrap:19:1
10:13:26 AM:     at gatsby-starter-hello-world/.cache/static-entry.js:16:39
10:13:26 AM:     at gatsby-starter-hello-world/node_modules/linkify-it/index.js:10:1
10:13:26 AM:     at gatsby-starter-hello-world/node_modules/linkify-it/index.js:62:1
10:13:26 AM:     at gatsby-starter-hello-world/node_modules/polished/dist/polished.cjs.js:559:1
10:13:26 AM:     at gatsby-starter-hello-world/src/components/styles/Button.js:4:20
10:13:26 AM:   36 |
10:13:26 AM:   37 |     try {
10:13:26 AM: > 38 |       db = JSON.parse(fs.readFileSync(path));
10:13:26 AM:      | ^
10:13:26 AM:   39 |     } catch(e) {
10:13:26 AM:   40 |       db = {};
10:13:26 AM:   41 |     }
10:13:27 AM: warning WebpackError: Unsafe builtin usage fs.readFileSync:
10:13:27 AM:     at gatsby-starter-hello-world/node_modules/dom-storage/lib/index.js:38:1
10:13:27 AM:     at gatsby-starter-hello-world/node_modules/@firebase/app/dist/index.node.cjs.js:659:1
10:13:27 AM:     at gatsby-starter-hello-world/webpack/bootstrap:19:1
10:13:27 AM:     at gatsby-starter-hello-world/node_modules/firebase/app/dist/index.cjs.js:3:16
10:13:27 AM:     at gatsby-starter-hello-world/webpack/bootstrap:19:1
10:13:27 AM:     at gatsby-starter-hello-world/webpack/bootstrap:19:1
10:13:27 AM:     at gatsby-starter-hello-world/.cache/api-runner-ssr.js:23:15
10:13:27 AM:     at gatsby-starter-hello-world/webpack/bootstrap:19:1
10:13:27 AM:     at gatsby-starter-hello-world/.cache/static-entry.js:16:39
10:13:27 AM:     at gatsby-starter-hello-world/node_modules/linkify-it/index.js:10:1
10:13:27 AM:     at gatsby-starter-hello-world/node_modules/linkify-it/index.js:62:1
10:13:27 AM:     at gatsby-starter-hello-world/node_modules/polished/dist/polished.cjs.js:559:1
10:13:27 AM:     at gatsby-starter-hello-world/src/components/styles/Button.js:4:20
10:13:27 AM:   36 |
10:13:27 AM:   37 |     try {
10:13:27 AM: > 38 |       db = JSON.parse(fs.readFileSync(path));
10:13:27 AM:      | ^
10:13:27 AM:   39 |     } catch(e) {
10:13:27 AM:   40 |       db = {};
10:13:28 AM: Creating deploy upload records
10:13:27 AM:   41 |     }
10:13:27 AM: success Building static HTML for pages - 7.050s - 335/335 47.52/s
10:13:27 AM: info [gatsby-plugin-netlify] Creating SSR/DSG redirects...
10:13:27 AM: info [gatsby-plugin-netlify] Created 0 SSR/DSG redirects...
10:13:27 AM: info [gatsby-plugin-netlify] No Netlify functions needed. Skipping...
10:13:27 AM: info Generated public/sw.js, which will precache 12 files, totaling 1014695 bytes.
10:13:28 AM: Failed during stage 'building site': Build script returned non-zero exit code: 1 (https://ntl.fyi/exit-code-1)
10:13:27 AM: The following pages will be precached:
10:13:27 AM: /offline-plugin-app-shell-fallback/index.html
10:13:27 AM: success onPostBuild - 0.216s
10:13:27 AM: 
10:13:27 AM: Pages
10:13:27 AM: ┌ .cache/caches/gatsby-plugin-offline/app-shell.js
10:13:27 AM: │ └   /offline-plugin-app-shell-fallback/
10:13:27 AM: ├ src/templates/overview.js
10:13:27 AM: │ ├   /courses/radiation-safety-awareness-x-ray-quality-assurance-systems-in-the-food-industry-course-38280
10:13:27 AM: │ └   ...6 more pages available
10:13:27 AM: ├ src/templates/module.js
10:13:27 AM: │ ├   /courses/radiation-safety-awareness-x-ray-quality-assurance-systems-in-the-food-industry-course-38280/46762
10:13:27 AM: │ └   ...42 more pages available
10:13:27 AM: ├ src/templates/section.js
10:13:27 AM: │ ├   /courses/radiation-safety-awareness-x-ray-quality-assurance-systems-in-the-food-industry-course-38280/46762/46889
10:13:27 AM: │ └   ...257 more pages available
10:13:27 AM: ├ src/templates/exam.js
10:13:27 AM: │ ├   /courses/radiation-safety-awareness-x-ray-quality-assurance-systems-in-the-food-industry-course-38280/exam
10:13:27 AM: │ └   ...6 more pages available
10:13:27 AM: ├ src/templates/resources.js
10:13:27 AM: │ ├   /courses/radiation-safety-awareness-x-ray-quality-assurance-systems-in-the-food-industry-course-38280/resources
10:13:27 AM: │ └   ...6 more pages available
10:13:27 AM: ├ src/templates/certificate.js
10:13:27 AM: │ ├   /courses/radiation-safety-awareness-x-ray-quality-assurance-systems-in-the-food-industry-course-38280/cert
10:13:27 AM: │ └   ...6 more pages available
10:13:27 AM: ├ src/pages/404.js
10:13:27 AM: │ ├   /404/
10:13:27 AM: │ └   /404.html
10:13:27 AM: ├ src/pages/account.js
10:13:27 AM: │ └   /account/
10:13:27 AM: ├ src/pages/admin.js
10:13:27 AM: │ └   /admin/
10:13:27 AM: └ src/pages/index.js
10:13:27 AM:   └   /
10:13:27 AM:   ╭────────────────────────────────────────────────────────────────────╮
10:13:27 AM:   │                                                                    │
10:13:27 AM:   │     (SSG) Generated at build time                                  │
10:13:27 AM:   │   D (DSG) Deferred static generation - page generated at runtime   │
10:13:27 AM:   │   ∞ (SSR) Server-side renders at runtime (uses getServerData)      │
10:13:27 AM:   │   λ (Function) Gatsby function                                     │
10:13:27 AM:   │                                                                    │
10:13:27 AM:   ╰────────────────────────────────────────────────────────────────────╯
10:13:27 AM: info Done building in 153.136066769 sec
10:13:27 AM: ​
10:13:27 AM: (build.command completed in 2m 33.3s)
10:13:27 AM: ​
10:13:27 AM: ────────────────────────────────────────────────────────────────
10:13:27 AM:   3. @netlify/plugin-gatsby (onBuild event)                     
10:13:27 AM: ────────────────────────────────────────────────────────────────
10:13:27 AM: ​
10:13:27 AM: Skipping Gatsby Functions and SSR/DSG support because gatsby-plugin-netlify reported that this site does not use them.
10:13:27 AM: If this is incorrect, remove the file "/opt/build/repo/.cache/.nf-skip-gatsby-functions" and try again.
10:13:27 AM: ​
10:13:27 AM: (@netlify/plugin-gatsby onBuild completed in 14ms)
10:13:27 AM: ​
10:13:27 AM: ────────────────────────────────────────────────────────────────
10:13:27 AM:   4. @netlify/plugin-gatsby (onPostBuild event)                 
10:13:27 AM: ────────────────────────────────────────────────────────────────
10:13:27 AM: ​
10:13:28 AM: Uncaught exception, the process will now terminate…
10:13:28 AM: TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator))
10:13:28 AM:     at Object.filter (file:///opt/buildhome/node-deps/node_modules/@netlify/build/src/plugins/ipc.js:42:68)
10:13:28 AM:     at ChildProcess.onItem (file:///opt/buildhome/node-deps/node_modules/p-event/index.js:41:35)
10:13:28 AM:     at ChildProcess.emit (node:events:539:35)
10:13:28 AM:     at ChildProcess.emit (node:domain:475:12)
10:13:28 AM:     at emit (node:internal/child_process:938:14)
10:13:28 AM:     at processTicksAndRejections (node:internal/process/task_queues:84:21)
10:13:28 AM: Caching artifacts
10:13:28 AM: Started saving node modules
10:13:28 AM: Finished saving node modules
10:13:28 AM: Started saving build plugins
10:13:28 AM: Finished saving build plugins
10:13:28 AM: Started saving pip cache
10:13:28 AM: Finished saving pip cache
10:13:28 AM: Started saving emacs cask dependencies
10:13:28 AM: Finished saving emacs cask dependencies
10:13:28 AM: Started saving maven dependencies
10:13:28 AM: Finished saving maven dependencies
10:13:28 AM: Started saving boot dependencies
10:13:28 AM: Finished saving boot dependencies
10:13:28 AM: Started saving rust rustup cache
10:13:28 AM: Finished saving rust rustup cache
10:13:28 AM: Started saving go dependencies
10:13:28 AM: Finished saving go dependencies
10:13:28 AM: Build was terminated: Build script returned non-zero exit code: 1
10:13:28 AM: Failing build: Failed to build site
10:13:28 AM: Finished processing build request in 3m34.7404142s
Build logs: Success without Essential Gatsby installed
10:25:37 AM: Build ready to start
10:25:38 AM: build-image version: d2c6dbeac570350a387d832f64bc980dc964ad65 (focal)
10:25:38 AM: build-image tag: v4.8.0
10:25:38 AM: buildbot version: 29e546ddee264a16af472b38ccba15b350150213
10:25:38 AM: Fetching cached dependencies
10:25:39 AM: Starting to download cache of 312.1MB
10:25:42 AM: Finished downloading cache in 3.603116049s
10:25:42 AM: Starting to extract cache
10:25:51 AM: Finished extracting cache in 8.928532794s
10:25:51 AM: Finished fetching cache in 12.561707243s
10:25:51 AM: Starting to prepare the repo for build
10:25:51 AM: Preparing Git Reference refs/heads/staging-revert
10:25:52 AM: Parsing package.json dependencies
10:25:53 AM: Starting build script
10:25:53 AM: Installing dependencies
10:25:53 AM: Python version set to 2.7
10:25:54 AM: Started restoring cached node version
10:25:55 AM: Finished restoring cached node version
10:25:55 AM: v16.14.0 is already installed.
10:25:55 AM: Now using node v16.14.0 (npm v8.3.1)
10:25:55 AM: Started restoring cached build plugins
10:25:55 AM: Finished restoring cached build plugins
10:25:55 AM: Attempting ruby version 2.7.2, read from environment
10:25:56 AM: Using ruby version 2.7.2
10:25:57 AM: Using PHP version 8.0
10:25:57 AM: No npm workspaces detected
10:25:57 AM: Started restoring cached node modules
10:25:57 AM: Finished restoring cached node modules
10:25:57 AM: Installing NPM modules using NPM version 8.3.1
10:26:19 AM: removed 69 packages, and audited 2452 packages in 21s
10:26:19 AM: 247 packages are looking for funding
10:26:19 AM:   run `npm fund` for details
10:26:20 AM: 54 vulnerabilities (10 moderate, 41 high, 3 critical)
10:26:20 AM: To address issues that do not require attention, run:
10:26:20 AM:   npm audit fix
10:26:20 AM: To address all issues possible (including breaking changes), run:
10:26:20 AM:   npm audit fix --force
10:26:20 AM: Some issues need review, and may require choosing
10:26:20 AM: a different dependency.
10:26:20 AM: Run `npm audit` for details.
10:26:20 AM: NPM modules installed
10:26:20 AM: Started restoring cached go cache
10:26:20 AM: Finished restoring cached go cache
10:26:20 AM: go version go1.16.5 linux/amd64
10:26:20 AM: go version go1.16.5 linux/amd64
10:26:20 AM: Installing missing commands
10:26:20 AM: Verify run directory
10:26:22 AM: ​
10:26:22 AM: ────────────────────────────────────────────────────────────────
10:26:22 AM:   Netlify Build                                                 
10:26:22 AM: ────────────────────────────────────────────────────────────────
10:26:22 AM: ​
10:26:22 AM: ❯ Version
10:26:22 AM:   @netlify/build 27.1.1
10:26:22 AM: ​
10:26:22 AM: ❯ Flags
10:26:22 AM:   baseRelDir: true
10:26:22 AM:   buildId: 6284bb9162038b5bb69fdb07
10:26:22 AM:   deployId: 6284bb9162038b5bb69fdb09
10:26:22 AM: ​
10:26:22 AM: ❯ Current directory
10:26:22 AM:   /opt/build/repo
10:26:22 AM: ​
10:26:22 AM: ❯ Config file
10:26:22 AM:   No config file was defined: using default values.
10:26:22 AM: ​
10:26:22 AM: ❯ Context
10:26:22 AM:   production
10:26:22 AM: ​
10:26:22 AM: ────────────────────────────────────────────────────────────────
10:26:22 AM:   1. Build command from Netlify app                             
10:26:22 AM: ────────────────────────────────────────────────────────────────
10:26:22 AM: ​
10:26:22 AM: $ gatsby build
10:26:25 AM: success compile gatsby files - 0.883s
10:26:25 AM: success load gatsby config - 0.036s
10:26:26 AM: success load plugins - 0.654s
10:26:26 AM: success onPreInit - 0.004s
10:26:26 AM: success initialize cache - 0.068s
10:26:26 AM: success copy gatsby files - 0.131s
10:26:26 AM: success Compiling Gatsby Functions - 0.211s
10:26:27 AM: success onPreBootstrap - 0.714s
10:26:34 AM: success createSchemaCustomization - 7.018s
10:26:34 AM: success Checking for changed pages - 0.000s
10:26:34 AM: success source and transform nodes - 0.243s
10:26:34 AM: info Writing GraphQL type definitions to /opt/build/repo/.cache/schema.gql
10:26:37 AM: success building schema - 2.736s
10:26:37 AM: success createPages - 0.799s
10:26:38 AM: success createPagesStatefully - 0.074s
10:26:38 AM: info Total nodes: 403, SitePage nodes: 335 (use --verbose for breakdown)
10:26:38 AM: success Checking for changed pages - 0.000s
10:26:38 AM: success onPreExtractQueries - 0.000s
10:26:52 AM: success extract queries from components - 14.010s
10:26:52 AM: success write out redirect data - 0.003s
10:26:52 AM: success Build manifest and related icons - 0.811s
10:26:52 AM: success onPostBootstrap - 0.870s
10:26:52 AM: info bootstrap finished - 30.595s
10:26:52 AM: success write out requires - 0.020s
10:27:45 AM: warning DefinePlugin
10:27:45 AM: Conflicting values for 'process.env'
10:27:45 AM: success Building production JavaScript and CSS bundles - 52.411s
10:28:13 AM: success Building HTML renderer - 28.291s
10:28:14 AM: success Execute page configs - 0.526s
10:28:14 AM: success Caching Webpack compilations - 0.001s
10:28:52 AM: success run queries in workers - 37.872s - 336/336 8.87/s
10:28:52 AM: success Merge worker state - 0.003s
10:28:52 AM: success Rewriting compilation hashes - 0.000s
10:29:01 AM: success Writing page-data.json files to public directory - 9.505s - 335/335 35.25/s
10:29:06 AM: warning Unsafe builtin method was used, future builds will need to rebuild all pages
10:29:08 AM: warning WebpackError: Unsafe builtin usage fs.readFileSync:
10:29:08 AM:     at gatsby-starter-hello-world/node_modules/dom-storage/lib/index.js:38:1
10:29:08 AM:     at gatsby-starter-hello-world/node_modules/@firebase/app/dist/index.node.cjs.js:658:1
10:29:08 AM:     at gatsby-starter-hello-world/webpack/bootstrap:19:1
10:29:08 AM:     at gatsby-starter-hello-world/node_modules/firebase/app/dist/index.cjs.js:3:16
10:29:08 AM:     at gatsby-starter-hello-world/webpack/bootstrap:19:1
10:29:08 AM:     at gatsby-starter-hello-world/webpack/bootstrap:19:1
10:29:08 AM:     at gatsby-starter-hello-world/.cache/api-runner-ssr.js:23:15
10:29:08 AM:     at gatsby-starter-hello-world/webpack/bootstrap:19:1
10:29:08 AM:     at gatsby-starter-hello-world/.cache/static-entry.js:16:39
10:29:08 AM:     at gatsby-starter-hello-world/node_modules/linkify-it/index.js:10:1
10:29:08 AM:     at gatsby-starter-hello-world/node_modules/linkify-it/index.js:62:1
10:29:08 AM:     at gatsby-starter-hello-world/node_modules/polished/dist/polished.cjs.js:559:1
10:29:08 AM:     at gatsby-starter-hello-world/src/components/styles/Button.js:4:20
10:29:08 AM:   36 |
10:29:08 AM:   37 |     try {
10:29:08 AM: > 38 |       db = JSON.parse(fs.readFileSync(path));
10:29:08 AM:      | ^
10:29:08 AM:   39 |     } catch(e) {
10:29:08 AM:   40 |       db = {};
10:29:08 AM:   41 |     }
10:29:09 AM: warning WebpackError: Unsafe builtin usage fs.readFileSync:
10:29:09 AM:     at gatsby-starter-hello-world/node_modules/dom-storage/lib/index.js:38:1
10:29:09 AM:     at gatsby-starter-hello-world/node_modules/@firebase/app/dist/index.node.cjs.js:659:1
10:29:09 AM:     at gatsby-starter-hello-world/webpack/bootstrap:19:1
10:29:09 AM:     at gatsby-starter-hello-world/node_modules/firebase/app/dist/index.cjs.js:3:16
10:29:09 AM:     at gatsby-starter-hello-world/webpack/bootstrap:19:1
10:29:09 AM:     at gatsby-starter-hello-world/webpack/bootstrap:19:1
10:29:09 AM:     at gatsby-starter-hello-world/.cache/api-runner-ssr.js:23:15
10:29:09 AM:     at gatsby-starter-hello-world/webpack/bootstrap:19:1
10:29:09 AM:     at gatsby-starter-hello-world/.cache/static-entry.js:16:39
10:29:09 AM:     at gatsby-starter-hello-world/node_modules/linkify-it/index.js:10:1
10:29:09 AM:     at gatsby-starter-hello-world/node_modules/linkify-it/index.js:62:1
10:29:09 AM:     at gatsby-starter-hello-world/node_modules/polished/dist/polished.cjs.js:559:1
10:29:09 AM:     at gatsby-starter-hello-world/src/components/styles/Button.js:4:20
10:29:09 AM:   36 |
10:29:09 AM:   37 |     try {
10:29:09 AM: > 38 |       db = JSON.parse(fs.readFileSync(path));
10:29:09 AM:      | ^
10:29:09 AM:   39 |     } catch(e) {
10:29:09 AM:   40 |       db = {};
10:29:09 AM:   41 |     }
10:29:09 AM: success Building static HTML for pages - 7.713s - 335/335 43.43/s
10:29:09 AM: info [gatsby-plugin-netlify] Creating SSR/DSG redirects...
10:29:09 AM: info [gatsby-plugin-netlify] Created 0 SSR/DSG redirects...
10:29:09 AM: info [gatsby-plugin-netlify] No Netlify functions needed. Skipping...
10:29:09 AM: info Generated public/sw.js, which will precache 12 files, totaling 1014695 bytes.
10:29:09 AM: The following pages will be precached:
10:29:09 AM: /offline-plugin-app-shell-fallback/index.html
10:29:09 AM: success onPostBuild - 0.199s
10:29:10 AM: Creating deploy upload records
10:29:09 AM: 
10:29:09 AM: Pages
10:29:09 AM: ┌ .cache/caches/gatsby-plugin-offline/app-shell.js
10:29:09 AM: │ └   /offline-plugin-app-shell-fallback/
10:29:09 AM: ├ src/templates/overview.js
10:29:09 AM: │ ├   /courses/radiation-safety-awareness-x-ray-quality-assurance-systems-in-the-food-industry-course-38280
10:29:09 AM: │ └   ...6 more pages available
10:29:09 AM: ├ src/templates/module.js
10:29:09 AM: │ ├   /courses/radiation-safety-awareness-x-ray-quality-assurance-systems-in-the-food-industry-course-38280/46762
10:29:09 AM: │ └   ...42 more pages available
10:29:09 AM: ├ src/templates/section.js
10:29:09 AM: │ ├   /courses/radiation-safety-awareness-x-ray-quality-assurance-systems-in-the-food-industry-course-38280/46762/46889
10:29:09 AM: │ └   ...257 more pages available
10:29:09 AM: ├ src/templates/exam.js
10:29:09 AM: │ ├   /courses/radiation-safety-awareness-x-ray-quality-assurance-systems-in-the-food-industry-course-38280/exam
10:29:09 AM: │ └   ...6 more pages available
10:29:09 AM: ├ src/templates/resources.js
10:29:09 AM: │ ├   /courses/radiation-safety-awareness-x-ray-quality-assurance-systems-in-the-food-industry-course-38280/resources
10:29:09 AM: │ └   ...6 more pages available
10:29:09 AM: ├ src/templates/certificate.js
10:29:09 AM: │ ├   /courses/radiation-safety-awareness-x-ray-quality-assurance-systems-in-the-food-industry-course-38280/cert
10:29:09 AM: │ └   ...6 more pages available
10:29:09 AM: ├ src/pages/404.js
10:29:09 AM: │ ├   /404/
10:29:09 AM: │ └   /404.html
10:29:09 AM: ├ src/pages/account.js
10:29:09 AM: │ └   /account/
10:29:09 AM: ├ src/pages/admin.js
10:29:09 AM: │ └   /admin/
10:29:09 AM: └ src/pages/index.js
10:29:09 AM:   └   /
10:29:09 AM:   ╭────────────────────────────────────────────────────────────────────╮
10:29:09 AM:   │                                                                    │
10:29:09 AM:   │     (SSG) Generated at build time                                  │
10:29:09 AM:   │   D (DSG) Deferred static generation - page generated at runtime   │
10:29:09 AM:   │   ∞ (SSR) Server-side renders at runtime (uses getServerData)      │
10:29:09 AM:   │   λ (Function) Gatsby function                                     │
10:29:09 AM:   │                                                                    │
10:29:09 AM:   ╰────────────────────────────────────────────────────────────────────╯
10:29:09 AM: info Done building in 167.19460999 sec
10:29:09 AM: ​
10:29:09 AM: (build.command completed in 2m 47.4s)
10:29:09 AM: ​
10:29:09 AM: ────────────────────────────────────────────────────────────────
10:29:09 AM:   2. Deploy site                                                
10:29:09 AM: ────────────────────────────────────────────────────────────────
10:29:09 AM: ​
10:29:09 AM: Starting to deploy site from 'public'
10:29:10 AM: Creating deploy tree asynchronously
10:29:12 AM: 365 new files to upload
10:29:12 AM: 0 new functions to upload
10:29:30 AM: Site deploy was successfully initiated
10:29:30 AM: ​
10:29:30 AM: (Deploy site completed in 21.2s)
10:29:30 AM: ​
10:29:30 AM: ────────────────────────────────────────────────────────────────
10:29:30 AM:   Netlify Build Complete                                        
10:29:30 AM: ────────────────────────────────────────────────────────────────
10:29:30 AM: ​
10:29:30 AM: (Netlify Build completed in 3m 8.7s)
10:29:31 AM: Caching artifacts
10:29:31 AM: Started saving node modules
10:29:31 AM: Finished saving node modules
10:29:31 AM: Started saving build plugins
10:29:31 AM: Finished saving build plugins
10:29:31 AM: Started saving pip cache
10:29:31 AM: Finished saving pip cache
10:29:31 AM: Started saving emacs cask dependencies
10:29:31 AM: Finished saving emacs cask dependencies
10:29:31 AM: Started saving maven dependencies
10:29:31 AM: Finished saving maven dependencies
10:29:31 AM: Started saving boot dependencies
10:29:31 AM: Finished saving boot dependencies
10:29:31 AM: Started saving rust rustup cache
10:29:31 AM: Finished saving rust rustup cache
10:29:31 AM: Started saving go dependencies
10:29:31 AM: Finished saving go dependencies
10:29:31 AM: Build script success
10:29:33 AM: Starting post processing
10:29:33 AM: Post processing - HTML
10:30:10 AM: Post processing - header rules
10:30:10 AM: Post processing - redirect rules
10:30:10 AM: Post processing done
10:30:14 AM: Site is live ✨
10:30:38 AM: Finished processing build request in 4m59.826687838s

@satcreative, with the latest version of the plugin, is this still an issue for you?

@nickytonline, I've just tried v3.2.3, which is the latest version available in the Netlify plugin directory, and that results in another failed deployment

Build logs

2:57:16 PM: Build ready to start
2:57:18 PM: build-image version: ac716c5be7f79fe384a0f3759e8ef612cb821a37 (xenial)
2:57:18 PM: build-image tag: v3.13.0
2:57:18 PM: buildbot version: 72ebfe61ef7a5152002962d9129cc52f5b1bb560
2:57:18 PM: Fetching cached dependencies
2:57:18 PM: Failed to fetch cache, continuing with build
2:57:18 PM: Starting to prepare the repo for build
2:57:19 PM: No cached dependencies found. Cloning fresh repo
2:57:19 PM: git clone git@bitbucket.org:satellitecreative/ionactive-training
2:57:22 PM: Preparing Git Reference refs/heads/staging
2:57:22 PM: Parsing package.json dependencies
2:57:23 PM: Starting build script
2:57:24 PM: Installing dependencies
2:57:24 PM: Python version set to 2.7
2:57:25 PM: Downloading and installing node v16.14.0...
2:57:25 PM: Downloading https://nodejs.org/dist/v16.14.0/node-v16.14.0-linux-x64.tar.xz...
2:57:25 PM: Computing checksum with sha256sum
2:57:26 PM: Checksums matched!
2:57:28 PM: Now using node v16.14.0 (npm v8.3.1)
2:57:28 PM: Started restoring cached build plugins
2:57:28 PM: Finished restoring cached build plugins
2:57:28 PM: Attempting ruby version 2.7.1, read from environment
2:57:29 PM: Required ruby-2.7.1 is not installed - installing.
2:57:30 PM: Searching for binary rubies, this might take some time.
2:57:30 PM: Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/16.04/x86_64/ruby-2.7.1.tar.bz2
2:57:30 PM: Checking requirements for ubuntu.
2:57:30 PM: Requirements installation successful.
2:57:30 PM: ruby-2.7.1 - #configure
2:57:30 PM: ruby-2.7.1 - #download
2:57:31 PM: ruby-2.7.1 - #validate archive
2:57:35 PM: ruby-2.7.1 - #extract
2:57:37 PM: ruby-2.7.1 - #validate binary
2:57:38 PM: ruby-2.7.1 - #setup
2:57:38 PM: ruby-2.7.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.7.1@global
2:57:39 PM: ruby-2.7.1 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems........................................
2:57:39 PM: ruby-2.7.1 - #generating global wrappers........
2:57:39 PM: ruby-2.7.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.7.1
2:57:39 PM: ruby-2.7.1 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
2:57:40 PM: ruby-2.7.1 - #generating default wrappers........
2:57:40 PM: Using /opt/buildhome/.rvm/gems/ruby-2.7.1
2:57:41 PM: Using ruby version 2.7.1
2:57:41 PM: Using PHP version 5.6
2:57:41 PM: No npm workspaces detected
2:57:41 PM: Started restoring cached node modules
2:57:41 PM: Finished restoring cached node modules
2:57:42 PM: Installing NPM modules using NPM version 8.3.1
2:57:59 PM: npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
2:57:59 PM: npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
2:58:00 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.
2:58:02 PM: npm WARN deprecated redux-devtools-extension@2.13.9: Package moved to @redux-devtools/extension.
2:58:02 PM: npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
2:58:05 PM: npm WARN deprecated mailgun-js@0.22.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
2:58:07 PM: npm WARN deprecated subscriptions-transport-ws@0.9.19: The subscriptions-transport-ws package is no longer maintained. We recommend you use graphql-ws instead. For help migrating Apollo software to graphql-ws, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using graphql-ws, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
2:58:07 PM: npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
2:58:10 PM: npm WARN deprecated superagent@5.3.1: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at https://github.com/visionmedia/superagent/releases.
2:58:10 PM: npm WARN deprecated async-cache@1.1.0: No longer maintained. Use lru-cache version 7.6 or higher, and provide an asynchronous fetchMethod option.
2:58:13 PM: npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
2:58:13 PM: npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
2:58:19 PM: npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
2:58:19 PM: npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
2:58:20 PM: npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
2:58:20 PM: npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
2:58:21 PM: npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
2:58:36 PM: npm WARN deprecated core-js@2.6.12: core-js@<3.4 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.
2:58:36 PM: npm WARN deprecated core-js@2.6.12: core-js@<3.4 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.
2:59:08 PM: added 2337 packages, and audited 2538 packages in 1m
2:59:08 PM: 252 packages are looking for funding
2:59:08 PM: run npm fund for details
2:59:09 PM: 68 vulnerabilities (17 moderate, 47 high, 4 critical)
2:59:09 PM: To address issues that do not require attention, run:
2:59:09 PM: npm audit fix
2:59:09 PM: To address all issues possible (including breaking changes), run:
2:59:09 PM: npm audit fix --force
2:59:09 PM: Some issues need review, and may require choosing
2:59:09 PM: a different dependency.
2:59:09 PM: Run npm audit for details.
2:59:09 PM: NPM modules installed
2:59:10 PM: Started restoring cached go cache
2:59:10 PM: Finished restoring cached go cache
2:59:10 PM: go version go1.14.4 linux/amd64
2:59:10 PM: go version go1.14.4 linux/amd64
2:59:10 PM: Installing missing commands
2:59:10 PM: Verify run directory
2:59:11 PM: ​
2:59:11 PM: ────────────────────────────────────────────────────────────────
2:59:11 PM: Netlify Build
2:59:11 PM: ────────────────────────────────────────────────────────────────
2:59:11 PM: ​
2:59:11 PM: ❯ Version
2:59:11 PM: @netlify/build 27.3.0
2:59:11 PM: ​
2:59:11 PM: ❯ Flags
2:59:11 PM: baseRelDir: true
2:59:11 PM: buildId: 62bb08bc7adb48149ef76913
2:59:11 PM: deployId: 62bb08bc7adb48149ef76915
2:59:11 PM: ​
2:59:11 PM: ❯ Current directory
2:59:11 PM: /opt/build/repo
2:59:11 PM: ​
2:59:11 PM: ❯ Config file
2:59:11 PM: No config file was defined: using default values.
2:59:11 PM: ​
2:59:11 PM: ❯ Context
2:59:11 PM: production
2:59:11 PM: ​
2:59:11 PM: ❯ Installing plugins
2:59:11 PM: - @netlify/plugin-gatsby@3.2.3
2:59:24 PM: ​
2:59:24 PM: ❯ Loading plugins
2:59:24 PM: - @netlify/plugin-gatsby@3.2.3 from Netlify app
2:59:26 PM: ​
2:59:26 PM: ────────────────────────────────────────────────────────────────
2:59:26 PM: 1. @netlify/plugin-gatsby (onPreBuild event)
2:59:26 PM: ────────────────────────────────────────────────────────────────
2:59:26 PM: ​
2:59:26 PM: No Gatsby cache found. Building fresh.
2:59:27 PM: ​
2:59:27 PM: (@netlify/plugin-gatsby onPreBuild completed in 710ms)
2:59:27 PM: ​
2:59:27 PM: ────────────────────────────────────────────────────────────────
2:59:27 PM: 2. Build command from Netlify app
2:59:27 PM: ────────────────────────────────────────────────────────────────
2:59:27 PM: ​
2:59:27 PM: $ gatsby build
2:59:30 PM: success compile gatsby files - 0.911s
2:59:30 PM: success load gatsby config - 0.048s
2:59:31 PM: success load plugins - 0.665s
2:59:31 PM: success onPreInit - 0.003s
2:59:31 PM: success initialize cache - 0.064s
2:59:31 PM: success copy gatsby files - 0.112s
2:59:31 PM: success Compiling Gatsby Functions - 0.208s
2:59:32 PM: success onPreBootstrap - 0.685s
2:59:40 PM: success createSchemaCustomization - 8.456s
2:59:40 PM: success Checking for changed pages - 0.000s
2:59:40 PM: success source and transform nodes - 0.115s
2:59:40 PM: info Writing GraphQL type definitions to /opt/build/repo/.cache/schema.gql
2:59:42 PM: success building schema - 1.604s
2:59:43 PM: success createPages - 1.340s
2:59:43 PM: success createPagesStatefully - 0.082s
2:59:43 PM: info Total nodes: 430, SitePage nodes: 361 (use --verbose for breakdown)
2:59:43 PM: success Checking for changed pages - 0.000s
2:59:43 PM: success onPreExtractQueries - 0.000s
2:59:53 PM: success extract queries from components - 9.916s
2:59:53 PM: success write out redirect data - 0.045s
2:59:54 PM: success Build manifest and related icons - 0.644s
2:59:54 PM: success onPostBootstrap - 0.645s
2:59:54 PM: info bootstrap finished - 27.064s
2:59:54 PM: success write out requires - 0.064s
3:01:42 PM: warning DefinePlugin
3:01:42 PM: Conflicting values for 'process.env'
3:01:42 PM: success Building production JavaScript and CSS bundles - 107.604s
3:02:18 PM: success Building HTML renderer - 36.950s
3:02:20 PM: success Execute page configs - 1.239s
3:02:20 PM: success Caching Webpack compilations - 0.001s
3:03:09 PM: success run queries in workers - 49.031s - 362/362 7.38/s
3:03:09 PM: success Merge worker state - 0.002s
3:03:09 PM: success Rewriting compilation hashes - 0.000s
3:03:19 PM: success Writing page-data.json files to public directory - 10.199s - 361/361 35.39/s
3:03:26 PM: warning Unsafe builtin method was used, future builds will need to rebuild all pages
3:03:28 PM: warning WebpackError: Unsafe builtin usage fs.readFileSync:
3:03:28 PM: at gatsby-starter-hello-world/node_modules/dom-storage/lib/index.js:38:1
3:03:28 PM: at gatsby-starter-hello-world/node_modules/@firebase/app/dist/index.node.cjs.js:658:1
3:03:28 PM: at gatsby-starter-hello-world/webpack/bootstrap:19:1
3:03:28 PM: at gatsby-starter-hello-world/node_modules/firebase/app/dist/index.cjs.js:3:16
3:03:28 PM: at gatsby-starter-hello-world/webpack/bootstrap:19:1
3:03:28 PM: at gatsby-starter-hello-world/node_modules/@react-pdf/layout/node_modules/ramda/src/objOf.js:13:13
3:03:28 PM: at gatsby-starter-hello-world/webpack/bootstrap:19:1
3:03:28 PM: at gatsby-starter-hello-world/.cache/api-runner-ssr.js:23:15
3:03:28 PM: at gatsby-starter-hello-world/webpack/bootstrap:19:1
3:03:28 PM: at gatsby-starter-hello-world/.cache/static-entry.js:16:39
3:03:28 PM: at gatsby-starter-hello-world/node_modules/@react-pdf/render/node_modules/ramda/src/internal/_isInteger.js:8:1
3:03:28 PM: at gatsby-starter-hello-world/node_modules/@emotion/react/dist/emotion-react.cjs.prod.js:204:1
3:03:28 PM: at gatsby-starter-hello-world/node_modules/@emotion/serialize/dist/emotion-serialize.cjs.prod.js:9:1
3:03:28 PM: at gatsby-starter-hello-world/node_modules/@emotion/react/dist/emotion-react.cjs.prod.js:82:1
3:03:28 PM: at gatsby-starter-hello-world/node_modules/@emotion/react/dist/emotion-element-b9b9378e.cjs.prod.js:92:2
3:03:28 PM: 36 |
3:03:28 PM: 37 | try {
3:03:28 PM: > 38 | db = JSON.parse(fs.readFileSync(path));
3:03:28 PM: | ^
3:03:28 PM: 39 | } catch(e) {
3:03:28 PM: 40 | db = {};
3:03:28 PM: 41 | }
3:03:30 PM: warning WebpackError: Unsafe builtin usage fs.readFileSync:
3:03:30 PM: at gatsby-starter-hello-world/node_modules/dom-storage/lib/index.js:38:1
3:03:30 PM: at gatsby-starter-hello-world/node_modules/@firebase/app/dist/index.node.cjs.js:659:1
3:03:30 PM: at gatsby-starter-hello-world/webpack/bootstrap:19:1
3:03:30 PM: at gatsby-starter-hello-world/node_modules/firebase/app/dist/index.cjs.js:3:16
3:03:30 PM: at gatsby-starter-hello-world/webpack/bootstrap:19:1
3:03:30 PM: at gatsby-starter-hello-world/node_modules/@react-pdf/layout/node_modules/ramda/src/objOf.js:13:13
3:03:30 PM: at gatsby-starter-hello-world/webpack/bootstrap:19:1
3:03:30 PM: at gatsby-starter-hello-world/.cache/api-runner-ssr.js:23:15
3:03:30 PM: at gatsby-starter-hello-world/webpack/bootstrap:19:1
3:03:30 PM: at gatsby-starter-hello-world/.cache/static-entry.js:16:39
3:03:30 PM: at gatsby-starter-hello-world/node_modules/@react-pdf/render/node_modules/ramda/src/internal/_isInteger.js:8:1
3:03:30 PM: at gatsby-starter-hello-world/node_modules/@emotion/react/dist/emotion-react.cjs.prod.js:204:1
3:03:30 PM: at gatsby-starter-hello-world/node_modules/@emotion/serialize/dist/emotion-serialize.cjs.prod.js:9:1
3:03:30 PM: at gatsby-starter-hello-world/node_modules/@emotion/react/dist/emotion-react.cjs.prod.js:82:1
3:03:30 PM: at gatsby-starter-hello-world/node_modules/@emotion/react/dist/emotion-element-b9b9378e.cjs.prod.js:92:2
3:03:30 PM: 36 |
3:03:30 PM: 37 | try {
3:03:30 PM: > 38 | db = JSON.parse(fs.readFileSync(path));
3:03:30 PM: | ^
3:03:30 PM: 39 | } catch(e) {
3:03:30 PM: 40 | db = {};
3:03:30 PM: 41 | }
3:03:30 PM: success Building static HTML for pages - 10.929s - 361/361 33.03/s
3:03:30 PM: info [gatsby-plugin-netlify] Creating SSR/DSG redirects...
3:03:30 PM: info [gatsby-plugin-netlify] Created 0 SSR/DSG redirects...
3:03:30 PM: info [gatsby-plugin-netlify] No Netlify functions needed. Skipping...
3:03:31 PM: info Generated public/sw.js, which will precache 12 files, totaling 1050766 bytes.
3:03:31 PM: The following pages will be precached:
3:03:31 PM: /offline-plugin-app-shell-fallback/index.html
3:03:31 PM: success onPostBuild - 0.711s
3:03:31 PM:
3:03:31 PM: Pages
3:03:31 PM: ┌ .cache/caches/gatsby-plugin-offline/app-shell.js
3:03:31 PM: │ └ /offline-plugin-app-shell-fallback/
3:03:31 PM: ├ src/templates/overview.js
3:03:31 PM: │ ├ /courses/radiation-safety-awareness-x-ray-quality-assurance-systems-in-the-food-industry-course-38280
3:03:31 PM: │ └ ...6 more pages available
3:03:31 PM: ├ src/templates/module.js
3:03:31 PM: │ ├ /courses/radiation-safety-awareness-x-ray-quality-assurance-systems-in-the-food-industry-course-38280/46762
3:03:31 PM: │ └ ...48 more pages available
3:03:31 PM: ├ src/templates/section.js
3:03:31 PM: │ ├ /courses/radiation-safety-awareness-x-ray-quality-assurance-systems-in-the-food-industry-course-38280/46762/46889
3:03:31 PM: │ └ ...277 more pages available
3:03:31 PM: ├ src/templates/exam.js
3:03:31 PM: │ ├ /courses/radiation-safety-awareness-x-ray-quality-assurance-systems-in-the-food-industry-course-38280/exam
3:03:31 PM: │ └ ...6 more pages available
3:03:31 PM: ├ src/templates/resources.js
3:03:31 PM: │ ├ /courses/radiation-safety-awareness-x-ray-quality-assurance-systems-in-the-food-industry-course-38280/resources
3:03:31 PM: │ └ ...6 more pages available
3:03:31 PM: ├ src/templates/certificate.js
3:03:31 PM: │ ├ /courses/radiation-safety-awareness-x-ray-quality-assurance-systems-in-the-food-industry-course-38280/cert
3:03:31 PM: │ └ ...6 more pages available
3:03:31 PM: ├ src/pages/404.js
3:03:31 PM: │ ├ /404/
3:03:31 PM: │ └ /404.html
3:03:31 PM: ├ src/pages/account.js
3:03:31 PM: │ └ /account/
3:03:31 PM: ├ src/pages/admin.js
3:03:31 PM: │ └ /admin/
3:03:31 PM: └ src/pages/index.js
3:03:31 PM: └ /
3:03:31 PM: ╭────────────────────────────────────────────────────────────────────╮
3:03:31 PM: │ │
3:03:31 PM: │ (SSG) Generated at build time │
3:03:31 PM: │ D (DSG) Deferred static generation - page generated at runtime │
3:03:31 PM: │ ∞ (SSR) Server-side renders at runtime (uses getServerData) │
3:03:31 PM: │ λ (Function) Gatsby function │
3:03:31 PM: │ │
3:03:31 PM: ╰────────────────────────────────────────────────────────────────────╯
3:03:31 PM: info Done building in 243.919407633 sec
3:03:31 PM: ​
3:03:31 PM: (build.command completed in 4m 4.2s)
3:03:31 PM: ​
3:03:31 PM: ────────────────────────────────────────────────────────────────
3:03:31 PM: 3. @netlify/plugin-gatsby (onBuild event)
3:03:31 PM: ────────────────────────────────────────────────────────────────
3:03:31 PM: ​
3:03:31 PM: Skipping Gatsby Functions and SSR/DSG support
3:03:31 PM: ​
3:03:31 PM: (@netlify/plugin-gatsby onBuild completed in 20ms)
3:03:31 PM: ​
3:03:31 PM: ────────────────────────────────────────────────────────────────
3:03:31 PM: 4. @netlify/plugin-gatsby (onPostBuild event)
3:03:31 PM: ────────────────────────────────────────────────────────────────
3:03:31 PM: ​
3:03:31 PM: Uncaught exception, the process will now terminate…
3:03:31 PM: TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator))
3:03:31 PM: at Object.filter (file:///opt/buildhome/node-deps/node_modules/@netlify/build/src/plugins/ipc.js:42:68)
3:03:31 PM: at ChildProcess.onItem (file:///opt/buildhome/node-deps/node_modules/p-event/index.js:41:35)
3:03:31 PM: at ChildProcess.emit (node:events:539:35)
3:03:31 PM: at ChildProcess.emit (node:domain:475:12)
3:03:31 PM: at emit (node:internal/child_process:938:14)
3:03:31 PM: at processTicksAndRejections (node:internal/process/task_queues:84:21)
3:03:31 PM: Caching artifacts
3:03:31 PM: Started saving node modules
3:03:31 PM: Finished saving node modules
3:03:31 PM: Started saving build plugins
3:03:31 PM: Finished saving build plugins
3:03:31 PM: Started saving pip cache
3:03:31 PM: Finished saving pip cache
3:03:31 PM: Started saving emacs cask dependencies
3:03:31 PM: Finished saving emacs cask dependencies
3:03:31 PM: Started saving maven dependencies
3:03:31 PM: Finished saving maven dependencies
3:03:31 PM: Started saving boot dependencies
3:03:31 PM: Finished saving boot dependencies
3:03:31 PM: Started saving rust rustup cache
3:03:31 PM: Finished saving rust rustup cache
3:03:31 PM: Started saving go dependencies
3:03:31 PM: Finished saving go dependencies
3:03:37 PM: Cached ruby version 2.7.1
3:03:37 PM: Build was terminated: Build script returned non-zero exit code: 1
3:03:37 PM: Creating deploy upload records
3:03:37 PM: Failing build: Failed to build site
3:03:37 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1 (https://ntl.fyi/exit-code-1)
3:03:38 PM: Finished processing build request in 6m19.514160685s

I see you've released v3.2.4 but it's not yet available in the Netlify plugin directory.

I tested all this on a staging version of the site. There is also a production version which has the same code but still has netlify-plugin-gatsby v1 installed and that deploys successfully.

I'm having te same problem with the plugin version 3.4.8 and Gatsby version 4.24.8.

Plugin V1 works.
No Plugin works.

But the latest version 3.4.8 gives me the same error

Hey folks!

This issue has been open for a while so can you please check if there's still an issue with the latest version of Gatsby and the Netlify plugin?

If it's still a problem, feel free to open a new issue with a reproduction for us. Thanks!