Intermittent Deployment Failures

Hi there. My website is: velvety-basbousa-08152b.netlify.app - it is a next.js site.

I’ve had quite a few issues today where sometimes deploys will be successful and other times they will fail on me (most of the time they fail). I understand that it probably has something to do with:

Warning: data for page “/blog/page/[page]” (path “/blog/page/20”) is 347 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.

But as I figure these issues out slowly, is there anything else I can do to ensure more regular successful deploys?

Thanks so much!!

8:44:01 PM: build-image version: ac04297350eb70143750579597f0ee10cba6ea6e (focal)
8:44:01 PM: buildbot version: ac04297350eb70143750579597f0ee10cba6ea6e
8:44:01 PM: Fetching cached dependencies
8:44:01 PM: Starting to download cache of 620.7MB
8:44:03 PM: Finished downloading cache in 2.166s
8:44:03 PM: Starting to extract cache
8:44:10 PM: Finished extracting cache in 7.028s
8:44:10 PM: Finished fetching cache in 9.282s
8:44:10 PM: Starting to prepare the repo for build
8:44:11 PM: Preparing Git Reference refs/heads/main
8:44:13 PM: Starting to install dependencies
8:44:13 PM: Started restoring cached mise cache
8:44:14 PM: Finished restoring cached mise cache
8:44:14 PM: Attempting Python version '3.8', read from environment
8:44:14 PM: downloading cpython-3.8.20+20241002-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz
8:44:14 PM: installing cpython-3.8.20+20241002-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz
8:44:14 PM: python --version
8:44:14 PM: Python 3.8.20
8:44:14 PM: mise python@3.8.20 ✓ installed
8:44:14 PM: Python version set to 3.8
8:44:14 PM: mise /opt/build/repo/.mise.toml tools: python@3.8.20
8:44:15 PM: Attempting Ruby version 2.7.2, read from environment
8:44:15 PM: Using Ruby version 2.7.2
8:44:16 PM: mise /opt/build/repo/.mise.toml tools: python@3.8.20
8:44:16 PM: Started restoring cached go cache
8:44:16 PM: Finished restoring cached go cache
8:44:16 PM: go version go1.19.13 linux/amd64
8:44:16 PM: mise /opt/build/repo/.mise.toml tools: python@3.8.20
8:44:16 PM: mise /opt/build/repo/.mise.toml tools: python@3.8.20
8:44:16 PM: mise /opt/build/repo/.mise.toml tools: python@3.8.20
8:44:17 PM: mise /opt/build/repo/.mise.toml tools: python@3.8.20
8:44:17 PM: Using PHP version 8.0
8:44:17 PM: mise /opt/build/repo/.mise.toml tools: python@3.8.20
8:44:17 PM: mise /opt/build/repo/.mise.toml tools: python@3.8.20
8:44:17 PM: mise /opt/build/repo/.mise.toml tools: python@3.8.20
8:44:17 PM: mise /opt/build/repo/.mise.toml tools: python@3.8.20
8:44:18 PM: mise /opt/build/repo/.mise.toml tools: python@3.8.20
8:44:18 PM: mise /opt/build/repo/.mise.toml tools: python@3.8.20
8:44:18 PM: Started restoring cached Node.js version
8:44:19 PM: Finished restoring cached Node.js version
8:44:20 PM: v18.20.4 is already installed.
8:44:20 PM: Now using node v18.20.4 (npm v10.7.0)
8:44:20 PM: Enabling Node.js Corepack
8:44:20 PM: Started restoring cached build plugins
8:44:20 PM: Finished restoring cached build plugins
8:44:20 PM: Started restoring cached corepack dependencies
8:44:20 PM: Finished restoring cached corepack dependencies
8:44:20 PM: No npm workspaces detected
8:44:20 PM: Started restoring cached node modules
8:44:20 PM: Finished restoring cached node modules
8:44:20 PM: Installing npm packages using npm version 10.7.0
8:44:21 PM: npm warn old lockfile
8:44:21 PM: npm warn old lockfile The package-lock.json file was created with an old version of npm,
8:44:21 PM: npm warn old lockfile so supplemental metadata must be fetched from the registry.
8:44:21 PM: npm warn old lockfile
8:44:21 PM: npm warn old lockfile This is a one-time fix-up, please be patient...
8:44:21 PM: npm warn old lockfile
8:44:28 PM: npm warn old lockfile Could not fetch metadata for string-width-cjs@4.2.3 string-width-cjs: No matching version found for string-width-cjs@4.2.3.
8:44:28 PM: npm warn old lockfile     at module.exports (/opt/buildhome/.nvm/versions/node/v18.20.4/lib/node_modules/npm/node_modules/npm-pick-manifest/lib/index.js:209:23)
8:44:28 PM: npm warn old lockfile     at RegistryFetcher.manifest (/opt/buildhome/.nvm/versions/node/v18.20.4/lib/node_modules/npm/node_modules/pacote/lib/registry.js:131:54)
8:44:28 PM: npm warn old lockfile     at async /opt/buildhome/.nvm/versions/node/v18.20.4/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:734:24 {
8:44:28 PM: npm warn old lockfile   code: 'ETARGET',
8:44:28 PM: npm warn old lockfile   type: 'version',
8:44:28 PM: npm warn old lockfile   wanted: '4.2.3',
8:44:28 PM: npm warn old lockfile   versions: [ '1.0.0', '5.1.1' ],
8:44:28 PM: npm warn old lockfile   distTags: { latest: '5.1.1' },
8:44:28 PM: npm warn old lockfile   defaultTag: 'latest'
8:44:28 PM: npm warn old lockfile }
8:44:28 PM: npm warn old lockfile Could not fetch metadata for strip-ansi-cjs@6.0.1 strip-ansi-cjs: No matching version found for strip-ansi-cjs@6.0.1.
8:44:28 PM: npm warn old lockfile     at module.exports (/opt/buildhome/.nvm/versions/node/v18.20.4/lib/node_modules/npm/node_modules/npm-pick-manifest/lib/index.js:209:23)
8:44:28 PM: npm warn old lockfile     at RegistryFetcher.manifest (/opt/buildhome/.nvm/versions/node/v18.20.4/lib/node_modules/npm/node_modules/pacote/lib/registry.js:131:54)
8:44:28 PM: npm warn old lockfile     at async /opt/buildhome/.nvm/versions/node/v18.20.4/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:734:24 {
8:44:28 PM: npm warn old lockfile   code: 'ETARGET',
8:44:28 PM: npm warn old lockfile   type: 'version',
8:44:28 PM: npm warn old lockfile   wanted: '6.0.1',
8:44:28 PM: npm warn old lockfile   versions: [ '1.0.0', '2.0.0', '8.0.0' ],
8:44:28 PM: npm warn old lockfile   distTags: { latest: '8.0.0' },
8:44:28 PM: npm warn old lockfile   defaultTag: 'latest'
8:44:28 PM: npm warn old lockfile }
8:44:28 PM: npm warn old lockfile Could not fetch metadata for wrap-ansi-cjs@7.0.0 wrap-ansi-cjs: No matching version found for wrap-ansi-cjs@7.0.0.
8:44:28 PM: npm warn old lockfile     at module.exports (/opt/buildhome/.nvm/versions/node/v18.20.4/lib/node_modules/npm/node_modules/npm-pick-manifest/lib/index.js:209:23)
8:44:28 PM: npm warn old lockfile     at RegistryFetcher.manifest (/opt/buildhome/.nvm/versions/node/v18.20.4/lib/node_modules/npm/node_modules/pacote/lib/registry.js:131:54)
8:44:28 PM: npm warn old lockfile     at async /opt/buildhome/.nvm/versions/node/v18.20.4/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:734:24 {
8:44:28 PM: npm warn old lockfile   code: 'ETARGET',
8:44:28 PM: npm warn old lockfile   type: 'version',
8:44:28 PM: npm warn old lockfile   wanted: '7.0.0',
8:44:28 PM: npm warn old lockfile   versions: [ '1.0.0', '8.0.0' ],
8:44:28 PM: npm warn old lockfile   distTags: { latest: '8.0.0' },
8:44:28 PM: npm warn old lockfile   defaultTag: 'latest'
8:44:28 PM: npm warn old lockfile }
8:44:30 PM: up to date, audited 1091 packages in 10s
8:44:30 PM: 383 packages are looking for funding
8:44:30 PM:   run `npm fund` for details
8:44:30 PM: 4 moderate severity vulnerabilities
8:44:30 PM: To address issues that do not require attention, run:
8:44:30 PM:   npm audit fix
8:44:30 PM: To address all issues (including breaking changes), run:
8:44:30 PM:   npm audit fix --force
8:44:30 PM: Run `npm audit` for details.
8:44:30 PM: npm packages installed
8:44:31 PM: Successfully installed dependencies
8:44:31 PM: Starting build script
8:44:31 PM: mise /opt/build/repo/.mise.toml tools: python@3.8.20
8:44:31 PM: mise /opt/build/repo/.mise.toml tools: python@3.8.20
8:44:32 PM: Detected 1 framework(s)
8:44:32 PM: "next" at version "13.0.2"
8:44:32 PM: Section completed: initializing
8:44:34 PM: ​
8:44:34 PM: Netlify Build                                                 
8:44:34 PM: ────────────────────────────────────────────────────────────────
8:44:34 PM: ​
8:44:34 PM: ❯ Version
8:44:34 PM:   @netlify/build 29.55.5
8:44:34 PM: ​
8:44:34 PM: ❯ Flags
8:44:34 PM:   accountId: 5a698230df9953671317a97f
8:44:34 PM:   baseRelDir: true
8:44:34 PM:   buildId: 6725053e7c40de4aee814929
8:44:34 PM:   deployId: 6725053e7c40de4aee81492b
8:44:34 PM: ​
8:44:34 PM: ❯ Current directory
8:44:34 PM:   /opt/build/repo
8:44:34 PM: ​
8:44:34 PM: ❯ Config file
8:44:34 PM:   No config file was defined: using default values.
8:44:34 PM: ​
8:44:34 PM: ❯ Context
8:44:34 PM:   production
8:44:34 PM: ​
8:44:34 PM: ❯ Using Next.js Runtime - v4.41.3
8:44:34 PM: ​
8:44:34 PM: ❯ Loading plugins
8:44:34 PM:    - @netlify/plugin-emails@1.1.1 from Netlify app
8:44:34 PM:    - @netlify/plugin-lighthouse@6.0.1 from Netlify app
8:44:34 PM: ​
8:44:34 PM: ❯ Outdated plugins
8:44:34 PM:    - @netlify/plugin-nextjs@4.41.3: latest version is 5.8.1
8:44:34 PM:      To upgrade this plugin, please uninstall and re-install it from the Netlify plugins directory (https://app.netlify.com/plugins)
8:44:36 PM: Next.js cache restored.
8:44:36 PM: ​
8:44:36 PM: Build command from Netlify app                                
8:44:36 PM: ────────────────────────────────────────────────────────────────
8:44:36 PM: ​
8:44:36 PM: $ npm run build
8:44:37 PM: > starter-blog@0.0.1 build
8:44:37 PM: > INIT_CWD=$PWD next build && cross-env NODE_OPTIONS='--experimental-json-modules' node -r esbuild-register ./scripts/postbuild.mjs
8:44:50 PM: Warning: Found 1 problems in 136 documents.
8:44:50 PM:  └── Missing required fields for 1 documents. (Skipping documents)
8:44:50 PM:      • "blog/10-day-itinerary-exploring-azerbaijan.mdx" (of type "Blog") is missing the following required fields:
8:44:50 PM:        • title: string
8:44:50 PM:        • date: date
8:44:50 PM: Generated 135 documents in .contentlayer
8:44:50 PM: info  - Linting and checking validity of types...
8:44:54 PM: error - ESLint: Cannot read properties of undefined (reading 'value') Occurred while linting /opt/build/repo/pages/_document.js:42 Rule: "@next/next/next-script-for-ga"
8:44:54 PM: info  - Creating an optimized production build...
8:45:04 PM: info  - Compiled successfully
8:45:04 PM: info  - Collecting page data...
8:45:07 PM: info  - Generating static pages (0/1093)
8:45:08 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/18") is 346 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:08 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:08 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/20") is 347 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:08 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:08 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/19") is 346 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:08 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:08 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/15") is 351 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:08 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:08 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/22") is 342 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:08 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:08 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/16") is 343 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:08 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:08 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/17") is 343 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:08 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:10 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/13") is 350 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:10 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:10 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/12") is 348 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:10 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:10 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/21") is 348 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:10 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:11 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/14") is 354 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:11 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:11 PM: Warning: data for page "/tags/[tag]" (path "/tags/travel") is 305 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:11 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:11 PM: Warning: data for page "/tags/[tag]" (path "/tags/europe") is 200 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:11 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:14 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/9") is 355 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:14 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:14 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/1") is 351 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:14 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:14 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/3") is 356 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:14 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:15 PM: Warning: data for page "/blog" is 351 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:15 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:15 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/4") is 348 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:15 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:15 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/5") is 357 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:15 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:15 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/8") is 353 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:15 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:15 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/6") is 355 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:15 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:16 PM: Warning: data for page "/" is 145 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:16 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:16 PM: info  - Generating static pages (273/1093)
8:45:16 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/7") is 348 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:16 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:16 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/11") is 357 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:16 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:16 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/10") is 350 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:16 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:17 PM: Warning: data for page "/blog/page/[page]" (path "/blog/page/2") is 359 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
8:45:17 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
8:45:19 PM: info  - Generating static pages (546/1093)
8:45:21 PM: info  - Generating static pages (819/1093)
8:45:30 PM: Killed
8:45:30 PM: ​
8:45:30 PM: "build.command" failed                                        
8:45:30 PM: ────────────────────────────────────────────────────────────────
8:45:30 PM: ​
8:45:30 PM:   Error message
8:45:30 PM:   Command failed with exit code 137: npm run build (https://ntl.fyi/exit-code-137)
8:45:30 PM: ​
8:45:30 PM:   Error location
8:45:30 PM:   In Build command from Netlify app:
8:45:30 PM:   npm run build
8:45:30 PM: ​
8:45:30 PM:   Resolved config
8:45:30 PM:   build:
8:45:30 PM:     command: npm run build
8:45:30 PM:     commandOrigin: ui
8:45:30 PM:     environment:
8:45:30 PM:       - NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME
8:45:30 PM:       - NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET
8:45:30 PM:       - NEXT_PUBLIC_IG_TOKEN
8:45:30 PM:       - NPM_FLAGS
8:45:30 PM:       - YOUTUBE_API_KEY
8:45:30 PM:       - NEXT_PRIVATE_TARGET
8:45:30 PM:     publish: /opt/build/repo/.next
8:45:30 PM:     publishOrigin: ui
8:45:30 PM:   plugins:
8:45:30 PM:     - inputs: {}
8:45:30 PM:       origin: ui
8:45:30 PM:       package: '@netlify/plugin-nextjs'
8:45:30 PM:     - inputs: {}
8:45:30 PM:       origin: ui
8:45:30 PM:       package: '@netlify/plugin-emails'
8:45:30 PM:     - inputs: {}
8:45:30 PM:       origin: ui
8:45:30 PM:       package: '@netlify/plugin-lighthouse'
8:45:31 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
8:45:31 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
8:45:31 PM: Failing build: Failed to build site
8:45:31 PM: Finished processing build request in 1m30.201s

The ultimate error appears to be:

The relevant Support Guide’s are: