Hi !
I keep getting the error “Build does not finish during the time limit”
Here’s the build log :
11:00:24 AM: build-image version: 8205490ca60064f5c9949f585e9e35b434be95b8 (focal)
11:00:24 AM: buildbot version: eb0b3c03ee1b40888f6883e255e3a141a5a683be
11:00:24 AM: Fetching cached dependencies
11:00:24 AM: Failed to fetch cache, continuing with build
11:00:24 AM: Starting to prepare the repo for build
11:00:24 AM: No cached dependencies found. Cloning fresh repo
11:00:24 AM: git clone --filter=blob:none https://github.com/our-repo/website
11:00:26 AM: Preparing Git Reference refs/heads/migrate-staging-netlify
11:00:35 AM: Starting to install dependencies
11:00:35 AM: Python version set to 3.8
11:00:35 AM: Attempting Ruby version 2.7.2, read from environment
11:00:36 AM: Using Ruby version 2.7.2
11:00:36 AM: Started restoring cached go cache
11:00:36 AM: Finished restoring cached go cache
11:00:36 AM: go version go1.19.12 linux/amd64
11:00:37 AM: Using PHP version 8.0
11:00:37 AM: Attempting Node.js version 'v18.12.1' from .nvmrc
11:00:38 AM: Downloading and installing node v18.12.1...
11:00:38 AM: Downloading https://nodejs.org/dist/v18.12.1/node-v18.12.1-linux-x64.tar.xz...
11:00:38 AM: Computing checksum with sha256sum
11:00:38 AM: Checksums matched!
11:00:40 AM: Now using node v18.12.1 (npm v8.19.2)
11:00:41 AM: Enabling Node.js Corepack
11:00:41 AM: Started restoring cached build plugins
11:00:41 AM: Finished restoring cached build plugins
11:00:41 AM: WARNING: The environment variable 'NODE_ENV' is set to 'production'. Any 'devDependencies' in package.json will not be installed
11:00:41 AM: Started restoring cached corepack dependencies
11:00:41 AM: Finished restoring cached corepack dependencies
11:00:41 AM: No npm workspaces detected
11:00:41 AM: Started restoring cached node modules
11:00:41 AM: Finished restoring cached node modules
11:00:41 AM: Installing npm packages using npm version 8.19.2
11:01:13 AM: npm WARN ERESOLVE overriding peer dependency
11:01:13 AM: npm WARN While resolving: react-server-dom-webpack@0.0.0-experimental-c8b778b7f-20220825
11:01:13 AM: npm WARN Found: react@18.2.0
11:01:13 AM: npm WARN node_modules/react
11:01:13 AM: npm WARN react@^18.2.0 from the root project
11:01:13 AM: npm WARN 23 more (@loadable/component, ...)
11:01:13 AM: npm WARN
11:01:13 AM: npm WARN Could not resolve dependency:
11:01:13 AM: npm WARN peer react@0.0.0-experimental-c8b778b7f-20220825 from react-server-dom-webpack@0.0.0-experimental-c8b778b7f-20220825
11:01:13 AM: npm WARN node_modules/react-server-dom-webpack
11:01:13 AM: npm WARN react-server-dom-webpack@0.0.0-experimental-c8b778b7f-20220825 from gatsby@5.12.3
11:01:13 AM: npm WARN node_modules/gatsby
11:01:13 AM: npm WARN
11:01:13 AM: npm WARN Conflicting peer dependency: react@0.0.0-experimental-c8b778b7f-20220825
11:01:13 AM: npm WARN node_modules/react
11:01:13 AM: npm WARN peer react@0.0.0-experimental-c8b778b7f-20220825 from react-server-dom-webpack@0.0.0-experimental-c8b778b7f-20220825
11:01:13 AM: npm WARN node_modules/react-server-dom-webpack
11:01:13 AM: npm WARN react-server-dom-webpack@0.0.0-experimental-c8b778b7f-20220825 from gatsby@5.12.3
11:01:13 AM: npm WARN node_modules/gatsby
11:01:23 AM: npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
11:01:23 AM: npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
11:01:24 AM: npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
11:01:24 AM: npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
11:01:24 AM: npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
11:01:24 AM: npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
11:01:24 AM: npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
11:01:24 AM: npm WARN deprecated har-validator@5.1.5: this library is no longer supported
11:01:25 AM: npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
11:01:25 AM: npm WARN deprecated caller-id@0.1.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
11:01:27 AM: npm WARN deprecated string-similarity@1.2.2: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
11:01:28 AM: npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
11:01:30 AM: npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
11:01:30 AM: npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
11:01:30 AM: npm WARN deprecated chokidar@1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
11:01:31 AM: npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
11:01:31 AM: 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.
11:01:31 AM: npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
11:01:36 AM: npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 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. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
11:01:36 AM: npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 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. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
11:01:36 AM: npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 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. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
11:01:54 AM: added 2088 packages, and audited 2089 packages in 1m
11:01:54 AM: 364 packages are looking for funding
11:01:54 AM: run `npm fund` for details
11:01:54 AM: 22 vulnerabilities (2 low, 2 moderate, 16 high, 2 critical)
11:01:54 AM: To address issues that do not require attention, run:
11:01:54 AM: npm audit fix
11:01:54 AM: To address all issues possible (including breaking changes), run:
11:01:54 AM: npm audit fix --force
11:01:54 AM: Some issues need review, and may require choosing
11:01:54 AM: a different dependency.
11:01:54 AM: Run `npm audit` for details.
11:01:54 AM: npm packages installed
11:01:54 AM: Install dependencies script success
11:01:54 AM: Starting build script
11:01:55 AM: Detected 1 framework(s)
11:01:55 AM: gatsby at version 5.12.3
11:01:55 AM: Section completed: initializing
11:01:56 AM:
11:01:56 AM: Netlify Build
11:01:56 AM: ────────────────────────────────────────────────────────────────
11:01:56 AM:
11:01:56 AM: ❯ Version
11:01:56 AM: @netlify/build 29.20.11
11:01:56 AM:
11:01:56 AM: ❯ Flags
11:01:56 AM: baseRelDir: true
11:01:56 AM: buildId: 64f0aaf95a995660208545e7
11:01:56 AM: deployId: 64f0aaf95a995660208545e9
11:01:57 AM:
11:01:57 AM: ❯ Current directory
11:01:57 AM: /opt/build/repo
11:01:57 AM:
11:01:57 AM: ❯ Config file
11:01:57 AM: No config file was defined: using default values.
11:01:57 AM:
11:01:57 AM: ❯ Context
11:01:57 AM: production
11:01:57 AM:
11:01:57 AM: ❯ Installing plugins
11:01:57 AM: - @netlify/plugin-gatsby@3.7.0
11:02:06 AM:
11:02:06 AM: ❯ Loading plugins
11:02:06 AM: - @netlify/plugin-gatsby@3.7.0 from Netlify app
11:02:07 AM:
11:02:07 AM: @netlify/plugin-gatsby (onPreBuild event)
11:02:07 AM: ────────────────────────────────────────────────────────────────
11:02:07 AM:
11:02:07 AM: Skipping @netlify/plugin-gatsby work, because used Gatsby version supports adapters.
11:02:07 AM:
11:02:07 AM: (@netlify/plugin-gatsby onPreBuild completed in 56ms)
11:02:07 AM:
11:02:07 AM: Build command from Netlify app
11:02:07 AM: ────────────────────────────────────────────────────────────────
11:02:07 AM:
11:02:07 AM: $ npm run build --verbose
11:02:07 AM: npm verb cli /opt/buildhome/.nvm/versions/node/v18.12.1/bin/node /opt/buildhome/.nvm/versions/node/v18.12.1/bin/npm
11:02:07 AM: npm info using npm@8.19.2
11:02:07 AM: npm info using node@v18.12.1
11:02:07 AM: npm timing npm:load:whichnode Completed in 0ms
11:02:07 AM: npm timing config:load:defaults Completed in 1ms
11:02:07 AM: npm timing config:load:file:/opt/buildhome/.nvm/versions/node/v18.12.1/lib/node_modules/npm/npmrc Completed in 1ms
11:02:07 AM: npm timing config:load:builtin Completed in 1ms
11:02:07 AM: npm timing config:load:cli Completed in 2ms
11:02:07 AM: npm timing config:load:env Completed in 0ms
11:02:07 AM: npm timing config:load:file:/opt/build/repo/.npmrc Completed in 0ms
11:02:07 AM: npm timing config:load:project Completed in 3ms
11:02:07 AM: npm timing config:load:file:/opt/buildhome/.npmrc Completed in 0ms
11:02:07 AM: npm timing config:load:user Completed in 0ms
11:02:07 AM: npm timing config:load:file:/opt/buildhome/.nvm/versions/node/v18.12.1/etc/npmrc Completed in 0ms
11:02:07 AM: npm timing config:load:global Completed in 0ms
11:02:07 AM: npm timing config:load:validate Completed in 0ms
11:02:07 AM: npm timing config:load:credentials Completed in 1ms
11:02:07 AM: npm timing config:load:setEnvs Completed in 1ms
11:02:07 AM: npm timing config:load Completed in 9ms
11:02:07 AM: npm timing npm:load:configload Completed in 9ms
11:02:07 AM: npm timing npm:load:mkdirpcache Completed in 3ms
11:02:07 AM: npm timing npm:load:mkdirplogs Completed in 0ms
11:02:07 AM: npm verb title npm run build
11:02:07 AM: npm verb argv run build --loglevel verbose
11:02:07 AM: npm timing npm:load:setTitle Completed in 1ms
11:02:07 AM: npm timing config:load:flatten Completed in 2ms
11:02:07 AM: npm timing npm:load:display Completed in 4ms
11:02:07 AM: npm verb logfile logs-max:10 dir:/opt/buildhome/.npm/_logs
11:02:07 AM: npm verb logfile /opt/buildhome/.npm/_logs/2023-08-31T15_02_07_768Z-debug-0.log
11:02:07 AM: npm timing npm:load:logFile Completed in 3ms
11:02:07 AM: npm timing npm:load:timers Completed in 0ms
11:02:07 AM: npm timing npm:load:configScope Completed in 1ms
11:02:07 AM: npm timing npm:load Completed in 21ms
11:02:07 AM: > our-company@5.0.0 build
11:02:07 AM: > gatsby build
11:02:10 AM: success compile gatsby files - 1.051s
11:02:10 AM: success load gatsby config - 0.055s
11:02:11 AM: success Installing Netlify adapter (gatsby-adapter-netlify@^1.0.0-alpha) - 1.179s
11:02:11 AM: info If you plan on staying on this deployment platform, consider installing gatsby-adapter-netlify as a dependency in your project. This will give you faster and more robust installs.
11:02:11 AM: info Using gatsby-adapter-netlify adapter
11:02:12 AM: warning Disabling plugin gatsby-plugin-netlify:
11:02:12 AM: - Not compatible with the gatsby-adapter-netlify adapter. Please remove it from your gatsby-config.
11:02:13 AM: success load plugins - 1.176s
11:02:13 AM: warning gatsby-plugin-react-helmet: Gatsby now has built-in support for modifying the document head. Learn more at https://gatsby.dev/gatsby-head
11:02:13 AM: success onPreInit - 0.007s
11:02:13 AM: success initialize cache - 0.055s
11:02:13 AM: success copy gatsby files - 0.132s
11:02:17 AM: success Compiling Gatsby Functions - 3.832s
11:02:17 AM: success onPreBootstrap - 3.842s
11:02:20 AM: success gatsby-source-wordpress ensuring plugin requirements are met - 1.891s
11:02:21 AM: ⠀
11:02:21 AM: info gatsby-source-wordpress
11:02:21 AM: This is either your first build or the cache was cleared.
11:02:21 AM: Please wait while your WordPress data is synced to your Gatsby cache.
11:02:21 AM: Maybe now's a good time to get up and stretch? :D
11:02:25 AM: success gatsby-source-wordpress ingest WPGraphQL schema - 5.698s
11:02:25 AM: success createSchemaCustomization - 7.802s
11:02:28 AM: success gatsby-source-wordpress PostFormat - 1.813s - fetched 1
11:02:28 AM: success gatsby-source-wordpress Event - 1.817s - fetched 2
11:02:28 AM: success gatsby-source-wordpress fetch root fields - 1.982s
11:02:34 AM: success gatsby-source-wordpress CtaTile - 8.099s - fetched 3
11:02:34 AM: success gatsby-source-wordpress Page - 8.100s - fetched 0
11:02:34 AM: success gatsby-source-wordpress UserRole - 8.099s - fetched 0
11:02:34 AM: success gatsby-source-wordpress Taxonomy - 8.102s - fetched 3
11:02:34 AM: success gatsby-source-wordpress AuthorProfile - 8.281s - fetched 16
11:02:34 AM: success gatsby-source-wordpress ContentStream - 8.207s - fetched 23
11:02:34 AM: success gatsby-source-wordpress User - 8.206s - fetched 19
11:02:34 AM: success gatsby-source-wordpress Webinar - 8.298s - fetched 21
11:02:34 AM: success gatsby-source-wordpress ContentType - 8.510s - fetched 8
11:02:43 AM: success gatsby-source-wordpress Category - 17.139s - fetched 38
11:02:56 AM: success gatsby-source-wordpress Post - 30.357s - fetched 452
11:03:03 AM: success gatsby-source-wordpress Tag - 36.783s - fetched 189
11:15:55 AM: success gatsby-source-wordpress MediaItem - 772.220s - fetched 1173
11:15:55 AM: success gatsby-source-wordpress creating nodes - 772.221s
11:15:55 AM: success gatsby-source-wordpress fetching nodes - 809.086s - 1948 total
11:15:55 AM: success Downloading remote files - 771.260s - 1160/1160 1.50/s
11:15:58 AM: success Checking for changed pages - 0.000s
11:15:58 AM: success source and transform nodes - 813.026s
11:15:59 AM: info Writing GraphQL type definitions to /opt/build/repo/.cache/schema.gql
11:15:59 AM: success building schema - 0.954s
11:16:32 AM: warning Your GraphQL query in createPages took 32.928 seconds which is an unexpectedly long time. See https://gatsby.dev/create-pages-performance for tips on how to improve this.
11:16:33 AM: success createPages - 33.976s
11:16:43 AM: success createPagesStatefully - 9.559s
11:16:43 AM: info Total nodes: 9437, SitePage nodes: 730 (use --verbose for breakdown)
11:16:43 AM: success Checking for changed pages - 0.000s
11:16:43 AM: success onPreExtractQueries - 0.003s
11:16:45 AM: success gatsby-source-wordpress diff schemas - 1.289s
11:16:45 AM: success gatsby-source-wordpress ingest WPGraphQL schema - 1.892s
11:16:57 AM: success extract queries from components - 13.527s
11:16:57 AM: success write out redirect data - 0.011s
11:16:58 AM: success Build manifest and related icons - 1.033s
11:16:58 AM: success onPostBootstrap - 1.054s
11:16:58 AM: info bootstrap finished - 890.267s
11:16:58 AM: success write out requires - 0.169s
11:17:02 AM: warning `isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`
11:17:02 AM: at isModuleDeclaration (/opt/build/repo/node_modules/@babel/types/lib/validators/generated/index.js:2740:35)
11:17:02 AM: at PluginPass.Program (/opt/build/repo/node_modules/babel-plugin-lodash/lib/index.js:102:44)
11:19:50 AM: success Building production JavaScript and CSS bundles - 172.672s
11:24:13 AM: success Building HTML renderer - 262.865s
11:24:13 AM: success Execute page configs - 0.044s
11:24:13 AM: success Caching Webpack compilations - 0.001s
11:24:29 AM: warning This query took more than 15s to run — which might indicate you're querying too much or have some unoptimized code:
File path: /opt/build/repo/src/templates/wp-post.js
11:25:59 AM: Killed
11:25:59 AM: npm timing command:run Completed in 1432054ms
11:25:59 AM: npm verb exit 137
11:25:59 AM: npm timing npm Completed in 1432082ms
11:25:59 AM: npm verb code 137
11:26:00 AM:
11:26:00 AM: build.command failed
11:26:00 AM: ────────────────────────────────────────────────────────────────
11:26:00 AM:
11:26:00 AM: Error message
11:26:00 AM: Command failed with exit code 137: npm run build --verbose (https://ntl.fyi/exit-code-137)
11:26:00 AM:
11:26:00 AM: Error location
11:26:00 AM: In Build command from Netlify app:
11:26:00 AM: npm run build --verbose
11:26:00 AM:
11:26:00 AM: Resolved config
11:26:00 AM: build:
11:26:00 AM: command: npm run build --verbose
11:26:00 AM: commandOrigin: ui
11:26:00 AM: environment:
11:26:00 AM: - GATSBY_ACTIVE_ENV
11:26:00 AM: - HS_ABM_HELPER_TOKEN
11:26:00 AM: - HS_ANALYTICS_TRACKING_TOKEN
11:26:00 AM: - NODE_ENV
11:26:00 AM: - SITE_URL
11:26:00 AM: - WP_PROD_CACHE_MEDIA_FILES
11:26:00 AM: - WP_URL
11:26:00 AM: publish: /opt/build/repo/public
11:26:00 AM: publishOrigin: ui
11:26:00 AM: plugins:
11:26:00 AM: - inputs: {}
11:26:00 AM: origin: ui
11:26:00 AM: package: '@netlify/plugin-gatsby'
11:26:20 AM: Execution timed out after 24m26.297532375s
11:26:20 AM: Error running command: Command did not finish within the time limit
11:26:21 AM: Failing build: Failed to build site
11:26:21 AM: Finished processing build request in 25m57.157s
This is for a Gatsby site that we’re in the process of migrating over from Gatsby Cloud. It’s always been a long build, I’m assuming due to a large number of media files coming from our Wordpress, but normally on Gatsby Cloud it’d take between 13 and 18 minutes for a first build, and then typically 2-6 minutes for subsequent builds thanks to incremental builds. I’m waiting to see if Netlify will have similar build times, but as things stand I can’t get to that initial build…
I’ll try and go in our WP to see if I can reduce the number of media files, but I’m not sure just how much good it can do. Is there anything else I could watch out for ?
My site’s current name is majestic-donut-89815d
Thank you for your help.