My builds stopped working on Netlify. Local build works fine.
Netlify site name: sprightly-gingersnap-e7d049
Domain: https://ramioda.lt
Build log, where error occurs:
9:46:33 AM: build-image version: 3d3c7e8b4321e2c1a54a2c4584fb46ba742b1630 (focal)
9:46:33 AM: buildbot version: 6e230d07ad2817029f7ba1516ca5c5a8371963f3
9:46:33 AM: Fetching cached dependencies
9:46:33 AM: Starting to download cache of 1006.8MB
9:46:37 AM: Finished downloading cache in 4.235s
9:46:37 AM: Starting to extract cache
9:46:43 AM: Finished extracting cache in 5.938s
9:46:43 AM: Finished fetching cache in 10.291s
9:46:43 AM: Starting to prepare the repo for build
9:46:44 AM: Preparing Git Reference refs/heads/main
9:46:45 AM: Custom functions path detected. Proceeding with the specified path: 'netlify/functions'
9:46:46 AM: Starting to install dependencies
9:46:46 AM: Python version set to 3.8
9:46:46 AM: Attempting Ruby version 2.7.2, read from environment
9:46:47 AM: Using Ruby version 2.7.2
9:46:47 AM: Started restoring cached go cache
9:46:47 AM: Finished restoring cached go cache
9:46:48 AM: go version go1.19.13 linux/amd64
9:46:49 AM: Using PHP version 8.0
9:46:50 AM: Started restoring cached Node.js version
9:46:51 AM: Finished restoring cached Node.js version
9:46:51 AM: Attempting Node.js version 'v20.12.2' from .nvmrc
9:46:52 AM: Downloading and installing node v20.12.2...
9:46:52 AM: Downloading https://nodejs.org/dist/v20.12.2/node-v20.12.2-linux-x64.tar.xz...
9:46:52 AM: Computing checksum with sha256sum
9:46:52 AM: Checksums matched!
9:46:54 AM: Now using node v20.12.2 (npm v10.5.0)
9:46:54 AM: Enabling Node.js Corepack
9:46:54 AM: Started restoring cached build plugins
9:46:54 AM: Finished restoring cached build plugins
9:46:54 AM: Started restoring cached corepack dependencies
9:46:54 AM: Finished restoring cached corepack dependencies
9:46:54 AM: No npm workspaces detected
9:46:54 AM: Started restoring cached node modules
9:46:54 AM: Finished restoring cached node modules
9:46:54 AM: Installing npm packages using npm version 10.5.0
9:46:59 AM: > rami-oda@1.0.0 prepare
9:46:59 AM: > husky install
9:46:59 AM: husky - Git hooks installed
9:46:59 AM: added 12 packages, removed 2 packages, changed 9 packages, and audited 2349 packages in 5s
9:46:59 AM: 388 packages are looking for funding
9:46:59 AM: run `npm fund` for details
9:46:59 AM: 31 vulnerabilities (15 moderate, 13 high, 3 critical)
9:46:59 AM: To address issues that do not require attention, run:
9:46:59 AM: npm audit fix
9:46:59 AM: To address all issues possible (including breaking changes), run:
9:46:59 AM: npm audit fix --force
9:46:59 AM: Some issues need review, and may require choosing
9:46:59 AM: a different dependency.
9:46:59 AM: Run `npm audit` for details.
9:46:59 AM: npm packages installed
9:47:00 AM: Successfully installed dependencies
9:47:00 AM: Starting build script
9:47:01 AM: Detected 1 framework(s)
9:47:01 AM: "gatsby" at version "5.13.6"
9:47:01 AM: Section completed: initializing
9:47:02 AM:
9:47:02 AM: Netlify Build
9:47:02 AM: ────────────────────────────────────────────────────────────────
9:47:02 AM:
9:47:02 AM: ❯ Version
9:47:02 AM: @netlify/build 29.45.0
9:47:02 AM:
9:47:02 AM: ❯ Flags
9:47:02 AM: baseRelDir: true
9:47:02 AM: buildId: 665c1539c8dd86000873f35b
9:47:02 AM: deployId: 665c1539c8dd86000873f35d
9:47:02 AM:
9:47:02 AM: ❯ Current directory
9:47:02 AM: /opt/build/repo
9:47:02 AM:
9:47:02 AM: ❯ Config file
9:47:02 AM: /opt/build/repo/netlify.toml
9:47:02 AM:
9:47:02 AM: ❯ Context
9:47:02 AM: production
9:47:02 AM:
9:47:02 AM: ❯ Loading plugins
9:47:02 AM: - @netlify/plugin-gatsby@3.8.1 from Netlify app
9:47:03 AM:
9:47:03 AM: @netlify/plugin-gatsby (onPreBuild event)
9:47:03 AM: ────────────────────────────────────────────────────────────────
9:47:03 AM:
9:47:03 AM: Skipping @netlify/plugin-gatsby work, because used Gatsby version supports adapters.
9:47:03 AM:
9:47:03 AM: (@netlify/plugin-gatsby onPreBuild completed in 58ms)
9:47:03 AM:
9:47:03 AM: Build command from Netlify app
9:47:03 AM: ────────────────────────────────────────────────────────────────
9:47:03 AM:
9:47:03 AM: $ npm run build
9:47:04 AM: > rami-oda@1.0.0 build
9:47:04 AM: > gatsby build
9:47:06 AM: success compile gatsby files - 1.158s
9:47:06 AM: success load gatsby config - 0.046s
9:47:06 AM: info Using gatsby-adapter-netlify adapter
9:47:12 AM: info [gatsby-adapter-netlify] Found a Gatsby cache. We're about to go FAST. ⚡
success load plugins - 0.765s
9:47:12 AM: success onPreInit - 0.003s
9:47:12 AM: success delete worker cache from previous builds - 0.001s
9:47:12 AM: info One or more of your plugins have changed since the last time you ran Gatsby. As
9:47:12 AM: a precaution, we're deleting your site's cache to ensure there's no stale data.
success initialize cache - 0.144s
9:47:13 AM: success copy gatsby files - 0.060s
9:47:13 AM: success Compiling Gatsby Functions - 0.153s
9:47:13 AM: success onPreBootstrap - 0.165s
9:47:18 AM: success gatsby-source-wordpress ensuring plugin requirements are met - 5.262s
9:47:20 AM: ⠀
9:47:20 AM: info gatsby-source-wordpress
9:47:20 AM: This is either your first build or the cache was cleared.
9:47:20 AM: Please wait while your WordPress data is synced to your Gatsby cache.
9:47:20 AM: Maybe now's a good time to get up and stretch? :D
9:47:25 AM: warning gatsby-source-wordpress Unable to find a single Node query for PaymentGateway
9:47:25 AM: This type will not be available in Gatsby.
9:47:25 AM: success gatsby-source-wordpress ingest WPGraphQL schema - 7.016s
9:47:25 AM: success createSchemaCustomization - 12.314s
9:47:28 AM: success gatsby-source-wordpress fetch root fields - 3.238s
9:47:29 AM: success gatsby-source-wordpress Category - 3.840s - fetched 4
9:47:36 AM: success gatsby-source-wordpress ContentType - 10.719s - fetched 4
9:48:02 AM: success gatsby-source-wordpress Comment - 37.231s - fetched 63
9:48:04 AM: success gatsby-source-wordpress Coupon - 2.020s - fetched 0
9:48:05 AM: success gatsby-source-wordpress Customer - 2.338s - fetched 0
9:48:06 AM: success gatsby-source-wordpress Menu - 1.437s - fetched 0
9:48:07 AM: success gatsby-source-wordpress MenuItem - 1.935s - fetched 0
9:48:08 AM: success gatsby-source-wordpress Order - 2.963s - fetched 0
9:48:11 AM: success gatsby-source-wordpress PostFormat - 2.854s - fetched 0
9:48:13 AM: success gatsby-source-wordpress Post - 5.812s - fetched 8
9:48:25 AM: success gatsby-source-wordpress Page - 17.127s - fetched 23
9:48:28 AM: success gatsby-source-wordpress ProductTag - 2.767s - fetched 0
9:48:36 AM: success gatsby-source-wordpress ProductType - 11.497s - fetched 4
9:52:27 AM: success gatsby-source-wordpress ProductCategory - 242.254s - fetched 132
9:52:29 AM: success gatsby-source-wordpress Refund - 1.912s - fetched 0
9:52:30 AM: success gatsby-source-wordpress ShippingClass - 2.516s - fetched 0
10:03:40 AM: success gatsby-source-wordpress Product - 672.859s - fetched 497
10:03:42 AM: success gatsby-source-wordpress TaxRate - 2.169s - fetched 0
10:03:43 AM: success gatsby-source-wordpress ShippingMethod - 2.779s - fetched 4
10:03:43 AM: success gatsby-source-wordpress Tag - 2.780s - fetched 0
10:03:45 AM: success gatsby-source-wordpress User - 2.235s - fetched 2
10:03:46 AM: success gatsby-source-wordpress UserRole - 3.520s - fetched 0
10:03:47 AM: success gatsby-source-wordpress Taxonomy - 4.238s - fetched 6
10:03:55 AM: success gatsby-source-wordpress VisibleProduct - 8.487s - fetched 9
10:07:00 AM: success gatsby-source-wordpress MediaItem - 184.214s - fetched 838
10:07:00 AM: success gatsby-source-wordpress creating nodes - 184.216s
10:07:00 AM: success gatsby-source-wordpress fetching nodes - 1174.502s - 1594 total
10:07:19 AM: success Clean up stale nodes - 0.033s - 0/0 0.00/s
10:07:19 AM: success Checking for changed pages - 0.000s
10:07:19 AM: success source and transform nodes - 1193.422s
10:07:19 AM: info Writing GraphQL type definitions to /opt/build/repo/.cache/schema.gql
10:07:20 AM: success building schema - 1.229s
10:07:20 AM: success createPages - 0.731s
10:07:21 AM: success createPagesStatefully - 0.078s
10:07:21 AM: info Total nodes: 3587, SitePage nodes: 669 (use --verbose for breakdown)
10:07:21 AM: success Checking for changed pages - 0.000s
10:07:21 AM: success Cleaning up stale page-data - 0.036s
10:07:21 AM: success onPreExtractQueries - 0.002s
10:07:23 AM: success extract queries from components - 2.615s
10:07:23 AM: success write out redirect data - 0.001s
10:07:23 AM: success Build manifest and related icons - 0.124s
10:07:23 AM: success onPostBootstrap - 0.125s
10:07:23 AM: info bootstrap finished - 1219.670s
10:07:23 AM: success write out requires - 0.003s
10:07:24 AM: success gatsby-source-wordpress diff schemas - 3.506s
10:07:25 AM: success gatsby-source-wordpress ingest WPGraphQL schema - 4.280s
10:07:43 AM: success Building production JavaScript and CSS bundles - 19.814s
10:07:56 AM: success Building HTML renderer - 13.137s
10:07:56 AM: success Execute page configs - 0.074s
10:07:56 AM: success Caching Webpack compilations - 0.000s
10:08:01 AM: error Unable to fetch:
10:08:01 AM: https://simple.tamulaitis.com/wp-content/uploads/2024/01/HubisLab-Derma-Regener-K-veido-kremas-40-g-187x300.jpg
10:08:01 AM: ---
10:08:01 AM: Reason: read ECONNRESET
10:08:01 AM: ---
10:08:01 AM: Fetch details:
10:08:01 AM: {
10:08:01 AM: "attempt": 3,
10:08:01 AM: "method": "GET",
10:08:01 AM: "errorCode": "ECONNRESET",
10:08:01 AM: "requestHeaders": {
10:08:01 AM: "user-agent": "got (https://github.com/sindresorhus/got)",
10:08:01 AM: "accept-encoding": "gzip, deflate, br"
10:08:01 AM: }
10:08:01 AM: }
10:08:01 AM: ---
10:08:01 AM:
10:08:01 AM:
10:08:01 AM: RequestError: read ECONNRESET
10:08:01 AM:
10:08:01 AM: - index.js:970 ClientRequest.<anonymous>
10:08:01 AM: [repo]/[got]/dist/source/core/index.js:970:111
10:08:01 AM:
10:08:01 AM: - node:events:633 Object.onceWrapper
10:08:01 AM: node:events:633:26
10:08:01 AM:
10:08:01 AM: - node:events:530 ClientRequest.emit
10:08:01 AM: node:events:530:35
10:08:01 AM:
10:08:01 AM: - index.js:43 ClientRequest.origin.emit
10:08:01 AM: [repo]/[@szmarczak]/http-timer/dist/source/index.js:43:20
10:08:01 AM:
10:08:01 AM: - node:_http_client:500 TLSSocket.socketErrorListener
10:08:01 AM: node:_http_client:500:9
10:08:01 AM:
10:08:01 AM: - node:events:518 TLSSocket.emit
10:08:01 AM: node:events:518:28
10:08:01 AM:
10:08:01 AM: - destroy:169 emitErrorNT
10:08:01 AM: node:internal/streams/destroy:169:8
10:08:01 AM:
10:08:01 AM: - destroy:128 emitErrorCloseNT
10:08:01 AM: node:internal/streams/destroy:128:3
10:08:01 AM:
10:08:01 AM: - task_queues:82 processTicksAndRejections
10:08:01 AM: node:internal/process/task_queues:82:21
10:08:01 AM:
10:08:01 AM: - stream_base_commons:217 TLSWrap.onStreamRead
10:08:01 AM: node:internal/stream_base_commons:217:20
10:08:01 AM:
10:08:01 AM: - async_hooks:130 TLSWrap.callbackTrampoline
10:08:01 AM: node:internal/async_hooks:130:17
10:08:01 AM:
10:08:01 AM:
10:08:01 AM: error An error occurred during parallel query running.
10:08:01 AM: Go here for troubleshooting tips: https://gatsby.dev/pqr-feedback
10:08:01 AM:
10:08:01 AM:
10:08:01 AM: Error: Worker exited before finishing task
10:08:01 AM:
10:08:01 AM: - index.js:205 ChildProcess.<anonymous>
10:08:01 AM: [repo]/[gatsby-worker]/dist/index.js:205:41
10:08:01 AM:
10:08:01 AM:
10:08:01 AM: not finished run queries in workers - 4.953s
10:08:02 AM:
10:08:02 AM: "build.command" failed
10:08:02 AM: ────────────────────────────────────────────────────────────────
10:08:02 AM:
10:08:02 AM: Error message
10:08:02 AM: Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
10:08:02 AM:
10:08:02 AM: Error location
10:08:02 AM: In Build command from Netlify app:
10:08:02 AM: npm run build
10:08:02 AM:
10:08:02 AM: Resolved config
10:08:02 AM: build:
10:08:02 AM: command: npm run build
10:08:02 AM: commandOrigin: ui
10:08:02 AM: environment:
10:08:02 AM: - ALGOLIA_ADMIN_KEY
10:08:02 AM: - GATSBY_ALGOLIA_APP_ID
10:08:02 AM: - GATSBY_ALGOLIA_SEARCH_KEY
10:08:02 AM: - GATSBY_STRIPE_KEY
10:08:02 AM: - GATSBY_STRIPE_KEY_LIVE
10:08:02 AM: - GOOGLE_TAG_MANAGER_ID
10:08:02 AM: - INSTAGRAM_ACCESS_TOKEN
10:08:02 AM: - NPM_FLAGS
10:08:02 AM: - STRIPE_SECRET_LIVE
10:08:02 AM: - STRIPE_SECRET_TEST
10:08:02 AM: publish: /opt/build/repo/public
10:08:02 AM: publishOrigin: ui
10:08:02 AM: functionsDirectory: /opt/build/repo/netlify/functions
10:08:02 AM: plugins:
10:08:02 AM: - inputs: {}
10:08:02 AM: origin: ui
10:08:02 AM: package: '@netlify/plugin-gatsby'
10:08:22 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:08:23 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
10:08:23 AM: Failing build: Failed to build site
10:08:23 AM: Finished processing build request in 21m49.771s
package.json:
"dependencies": {
"@apollo/client": "^3.10.4",
"@stripe/react-stripe-js": "^2.7.1",
"@stripe/stripe-js": "^2.4.0",
"@wordpress/block-library": "^8.35.0",
"algoliasearch": "^4.23.3",
"cross-fetch": "^4.0.0",
"dotenv": "^16.4.5",
"gatsby": "^5.13.6",
"gatsby-adapter-netlify": "^1.1.6",
"gatsby-plugin-algolia": "^1.0.3",
"gatsby-plugin-facebook-pixel": "^1.0.8",
"gatsby-plugin-google-tagmanager": "^5.13.1",
"gatsby-plugin-image": "^3.13.1",
"gatsby-plugin-mailchimp": "^5.2.2",
"gatsby-plugin-manifest": "^5.13.1",
"gatsby-plugin-react-svg": "^3.3.0",
"gatsby-plugin-sharp": "^5.13.1",
"gatsby-plugin-sitemap": "^6.13.1",
"gatsby-plugin-styled-components": "^6.13.1",
"gatsby-plugin-tawk.to": "^1.0.8",
"gatsby-source-filesystem": "^5.13.1",
"gatsby-source-instagram-all": "^5.2.4",
"gatsby-source-wordpress": "^7.13.4",
"gatsby-transformer-sharp": "^5.13.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-instantsearch": "^7.10.0",
"sanitize.css": "^13.0.0",
"sharp": "^0.33.4",
"stripe": "^14.25.0",
"styled-components": "^5.3.11",
"stylelint": "^14.16.1",
"swiper": "^9.4.1"
},
"devDependencies": {
"@stylelint/postcss-css-in-js": "^0.38.0",
"@types/styled-components": "^5.1.34",
"@typescript-eslint/eslint-plugin": "^7.11.0",
"@typescript-eslint/parser": "^7.11.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.10.0",
"eslint-loader": "^4.0.2",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.34.2",
"gatsby-plugin-eslint": "^4.0.4",
"gatsby-plugin-root-import": "^2.0.9",
"husky": "^7.0.4",
"prettier": "^2.8.8",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-rational-order": "^0.1.2",
"stylelint-config-recommended": "^6.0.0",
"stylelint-config-styled-components": "^0.1.1",
"stylelint-order": "^5.0.0",
"typescript": "^5.4.5"
}
gatsby.config:
const path = require('path');
const adapter = require('gatsby-adapter-netlify').default;
require('dotenv').config();
const gatsbyRequiredRules = path.join(
process.cwd(),
'node_modules',
'gatsby',
'dist',
'utils',
'eslint-rules'
);
module.exports = {
adapter: adapter({
excludeDatastoreFromEngineFunction: true,
imageCDN: true,
}),
siteMetadata: {
title: `x`,
description: `x `,
author: `x`,
siteUrl: `https://ramioda.lt`,
image: '/logo-og.jpg',
},
plugins: [
{
resolve: 'gatsby-source-wordpress',
options: {
url: 'https://simple.tamulaitis.com/graphql',
develop: {
hardCacheMediaFiles: true,
},
html: {
createStaticFiles: false,
useGatsbyImage: false,
},
schema: {
requestConcurrency: 3,
perPage: 5,
timeout: 8000000,
previewRequestConcurrency: 2,
},
type: {
Coupon: {
exclude: true,
},
Customer: {
exclude: true,
},
PaymentGateway: {
exclude: true,
},
Menu: {
exclude: true,
},
MenuItem: {
exclude: true,
},
Order: {
exclude: true,
},
PostFormat: {
exclude: true,
},
ProductTag: {
exclude: true,
},
Refund: {
exclude: true,
},
ShippingClass: {
exclude: true,
},
TaxRate: {
exclude: true,
},
MediaItem: {
localFile: {
requestConcurrency: 5,
},
excludeFieldNames: [
'contentNodes',
'seo',
'ancestors',
'author',
'template',
'lastEditedBy',
'authorDatabaseId',
'authorId',
'contentTypeName',
'dateGmt',
'desiredSlug',
'enclosure',
'isContentNode',
'isTermNode',
'modified',
'modifiedGmt',
'parentDatabaseId',
'parentId',
'srcSet',
'parent',
'children',
],
createFileNodes: false,
},
},
},
},
'gatsby-plugin-image',
'gatsby-plugin-sharp',
'gatsby-transformer-sharp',
'gatsby-plugin-styled-components',
'gatsby-plugin-typescript',
{
resolve: 'gatsby-plugin-sitemap',
options: {
query: `
{
allSitePage {
nodes {
path
}
}
site {
siteMetadata {
siteUrl
}
}
allWpContentNode(filter: {nodeType: {in: ["Post", "Page", "SimpleProduct"]}}) {
nodes {
... on WpPost {
uri
modifiedGmt
}
... on WpPage {
uri
modifiedGmt
}
... on WpSimpleProduct {
uri
modifiedGmt
}
}
}
}
`,
resolvePages: ({
allSitePage: { nodes: allPages },
allWpContentNode: { nodes: allWpNodes },
}) => {
const wpNodeMap = allWpNodes.reduce((acc, node) => {
const { uri } = node;
acc[uri] = node;
return acc;
}, {});
return allPages.map(page => {
return { ...page, ...wpNodeMap[page.path] };
});
},
serialize: ({ path, modifiedGmt }) => {
return {
url: path,
lastmod: modifiedGmt,
priority: 1,
};
},
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/assets/images`,
},
},
{
resolve: 'gatsby-plugin-eslint',
options: {
rulePaths: [gatsbyRequiredRules],
},
},
{
resolve: 'gatsby-plugin-react-svg',
options: {
rule: {
include: /icons/,
},
},
},
{
resolve: 'gatsby-plugin-root-import',
options: {
src: path.join(__dirname, 'src'),
},
},
{
resolve: 'gatsby-plugin-google-tagmanager',
options: {
id: 'x',
},
},
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `Rami oda`,
short_name: `Rami oda`,
start_url: `/`,
background_color: `#F8F6F3`,
theme_color: `#F8F6F3`,
display: `minimal-ui`,
icon: `src/assets/images/favicon.png`,
},
},
{
resolve: 'gatsby-plugin-mailchimp',
options: {
endpoint:
'x',
timeout: 3500,
},
},
{
resolve: `gatsby-source-instagram-all`,
options: {
access_token: process.env.INSTAGRAM_ACCESS_TOKEN,
},
},
{
resolve: `gatsby-plugin-facebook-pixel`,
options: {
pixelId: 'x',
},
},
{
resolve: `gatsby-plugin-algolia`,
options: {
appId: process.env.GATSBY_ALGOLIA_APP_ID,
apiKey: process.env.ALGOLIA_ADMIN_KEY,
queries: require('./src/utils/algolia/queries'),
},
},
{
resolve: `gatsby-plugin-tawk.to`,
options: {
tawkId: 'x',
tawkKey: 'x',
},
},
],
};