NextJS Build Timing Out Multiple Times

I’ve tried deploying this NextJS site multiple times, but it just freezes during deploy on Netlify. However, “npm run build” completes in seconds locally.

Latest build: Netlify App

Screenshot of build settings (overridden with netlify.toml):

netlify.toml:

[Settings]

# Settings in the [build] context are global and are applied to all contexts
# unless otherwise overridden by more specific contexts.
[build]
  # Directory to change to before starting a build.
  # This is where we will look for package.json/.nvmrc/etc.
  base = "spotlight"

  # Directory (relative to root of your repo) that contains the deploy-ready
  # HTML files and assets generated by the build.
  publish = "build/"

  # Default build command.
  command = "npm run build"

  # Directory with the lambda functions to deploy to AWS.
  #functions = ".netlify/functions"

[[headers]]
  # Define which paths this specific [[headers]] block will cover.
  for = "/*"
    [headers.values]
    Access-Control-Allow-Origin = "*"
    Access-Control-Allow-Methods = "POST, PUT, DELETE"
    Access-Control-Allow-Headers = "Content-Type, Accept"


# Branch deploy context:
# All deploys that are not from a pull/merge request
# or from the production branch will inherit these settings.
#[context.branch-deploy]
#  command = "make staging"



# Staging branch
[context.branch-deploy]
  command = "npm run build:staging"

Full Log:

9:57:43 PM: build-image version: 4e021f34e58c8c6c6ee69b078ac3e861fee3ee31 (focal)
9:57:43 PM: buildbot version: 4e021f34e58c8c6c6ee69b078ac3e861fee3ee31
9:57:43 PM: Building without cache
9:57:43 PM: Starting to prepare the repo for build
9:57:44 PM: No cached dependencies found. Cloning fresh repo
9:57:44 PM: git clone --filter=blob:none https://github.com/josiahbryan/josiahbryan.com
9:57:44 PM: Preparing Git Reference refs/heads/master
9:57:50 PM: Parsing package.json dependencies
9:57:50 PM: Different build dir detected, going to use the one specified in the Netlify configuration file: 'spotlight' versus '' in the Netlify UI
9:57:50 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'spotlight/build' versus 'build/' in the Netlify UI
9:57:51 PM: Starting to install dependencies
9:57:51 PM: Python version set to 3.8
9:57:51 PM: Started restoring cached go cache
9:57:51 PM: Finished restoring cached go cache
9:57:51 PM: Installing Go version 1.19.5 (requested 1.19.5)
9:57:55 PM: go version go1.19.5 linux/amd64
9:57:56 PM: Using PHP version 8.0
9:57:56 PM: Downloading and installing node v14.4.0...
9:57:56 PM: Downloading https://nodejs.org/dist/v14.4.0/node-v14.4.0-linux-x64.tar.xz...
9:57:56 PM: Computing checksum with sha256sum
9:57:56 PM: Checksums matched!
9:57:58 PM: Now using node v14.4.0 (npm v6.14.5)
9:57:58 PM: Started restoring cached build plugins
9:57:58 PM: Finished restoring cached build plugins
9:57:58 PM: Started restoring cached corepack dependencies
9:57:58 PM: Finished restoring cached corepack dependencies
9:57:58 PM: No npm workspaces detected
9:57:58 PM: Started restoring cached node modules
9:57:58 PM: Finished restoring cached node modules
9:57:58 PM: Installing npm packages using npm version 6.14.5
9:58:13 PM: npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
9:58:13 PM: > core-js-pure@3.22.5 postinstall /opt/build/repo/spotlight/node_modules/core-js-pure
9:58:13 PM: > node -e "try{require('./postinstall')}catch(e){}"
9:58:14 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-android-arm-eabi@13.0.2 (node_modules/@next/swc-android-arm-eabi):
9:58:14 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-android-arm-eabi@13.0.2: wanted {"os":"android","arch":"arm"} (current: {"os":"linux","arch":"x64"})
9:58:14 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-android-arm64@13.0.2 (node_modules/@next/swc-android-arm64):
9:58:14 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-android-arm64@13.0.2: wanted {"os":"android","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
9:58:14 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-darwin-arm64@13.0.2 (node_modules/@next/swc-darwin-arm64):
9:58:14 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-darwin-arm64@13.0.2: wanted {"os":"darwin","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
9:58:14 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-darwin-x64@13.0.2 (node_modules/@next/swc-darwin-x64):
9:58:14 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-darwin-x64@13.0.2: wanted {"os":"darwin","arch":"x64"} (current: {"os":"linux","arch":"x64"})
9:58:14 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-freebsd-x64@13.0.2 (node_modules/@next/swc-freebsd-x64):
9:58:14 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-freebsd-x64@13.0.2: wanted {"os":"freebsd","arch":"x64"} (current: {"os":"linux","arch":"x64"})
9:58:14 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-linux-arm-gnueabihf@13.0.2 (node_modules/@next/swc-linux-arm-gnueabihf):
9:58:14 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-linux-arm-gnueabihf@13.0.2: wanted {"os":"linux","arch":"arm"} (current: {"os":"linux","arch":"x64"})
9:58:14 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-linux-arm64-gnu@13.0.2 (node_modules/@next/swc-linux-arm64-gnu):
9:58:14 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-linux-arm64-gnu@13.0.2: wanted {"os":"linux","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
9:58:14 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-linux-arm64-musl@13.0.2 (node_modules/@next/swc-linux-arm64-musl):
9:58:14 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-linux-arm64-musl@13.0.2: wanted {"os":"linux","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
9:58:14 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-win32-ia32-msvc@13.0.2 (node_modules/@next/swc-win32-ia32-msvc):
9:58:14 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-win32-ia32-msvc@13.0.2: wanted {"os":"win32","arch":"ia32"} (current: {"os":"linux","arch":"x64"})
9:58:14 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-win32-x64-msvc@13.0.2 (node_modules/@next/swc-win32-x64-msvc):
9:58:14 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-win32-x64-msvc@13.0.2: wanted {"os":"win32","arch":"x64"} (current: {"os":"linux","arch":"x64"})
9:58:14 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-win32-arm64-msvc@13.0.2 (node_modules/@next/swc-win32-arm64-msvc):
9:58:14 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-win32-arm64-msvc@13.0.2: wanted {"os":"win32","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
9:58:14 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
9:58:14 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
9:58:14 PM: added 717 packages from 365 contributors and audited 729 packages in 14.869s
9:58:14 PM: 225 packages are looking for funding
9:58:14 PM:   run `npm fund` for details
9:58:14 PM: found 4 vulnerabilities (2 moderate, 2 high)
9:58:14 PM:   run `npm audit fix` to fix them, or `npm audit` for details
9:58:14 PM: npm packages installed
9:58:14 PM: Attempting Ruby version 2.6.2, read from environment
9:58:15 PM: Required ruby-2.6.2 is not installed - installing.
9:58:15 PM: Searching for binary rubies, this might take some time.
9:58:15 PM: Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/20.04/x86_64/ruby-2.6.2.tar.bz2
9:58:15 PM: Checking requirements for ubuntu.
9:58:15 PM: Requirements installation successful.
9:58:15 PM: ruby-2.6.2 - #configure
9:58:15 PM: ruby-2.6.2 - #download
9:58:15 PM: ruby-2.6.2 - #validate archive
9:58:19 PM: ruby-2.6.2 - #extract
9:58:20 PM: ruby-2.6.2 - #validate binary
9:58:21 PM: ruby-2.6.2 - #setup
9:58:21 PM: ruby-2.6.2 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.6.2@global
9:58:21 PM: ruby-2.6.2 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems........................................
9:58:22 PM: ruby-2.6.2 - #generating global wrappers........
9:58:22 PM: ruby-2.6.2 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.6.2
9:58:22 PM: ruby-2.6.2 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
9:58:22 PM: ruby-2.6.2 - #generating default wrappers........
9:58:22 PM: Using /opt/buildhome/.rvm/gems/ruby-2.6.2
9:58:23 PM: Using Ruby version 2.6.2
9:58:23 PM: Install dependencies script success
9:58:23 PM: Starting build script
9:58:23 PM: Using stage install dependencies
9:58:24 PM: Detected 1 framework(s)
9:58:24 PM: "next" at version "13.0.2"
9:58:24 PM: Section completed: initializing
9:58:25 PM: ​
9:58:25 PM:   Netlify Build                                                 
9:58:25 PM: ────────────────────────────────────────────────────────────────
9:58:25 PM: ​
9:58:25 PM: ❯ Version
9:58:25 PM:   @netlify/build 29.8.0
9:58:25 PM: ​
9:58:25 PM: ❯ Flags
9:58:25 PM:   baseRelDir: true
9:58:25 PM:   buildId: 6424faa456a66d0592bf56ca
9:58:25 PM:   deployId: 6424faa456a66d0592bf56cc
9:58:25 PM: ​
9:58:25 PM: ❯ Current directory
9:58:25 PM:   /opt/build/repo/spotlight
9:58:25 PM: ​
9:58:25 PM: ❯ Config file
9:58:25 PM:   /opt/build/repo/netlify.toml
9:58:25 PM: ​
9:58:25 PM: ❯ Context
9:58:25 PM:   production
9:58:25 PM: ​
9:58:25 PM:   1. build.command from netlify.toml                            
9:58:25 PM: ────────────────────────────────────────────────────────────────
9:58:25 PM: ​
9:58:25 PM: $ npm run build
9:58:25 PM: > tailwindui-template@0.1.0 build /opt/build/repo/spotlight
9:58:25 PM: > next build
9:58:26 PM: warn  - You have enabled experimental feature (scrollRestoration) in next.config.mjs.
9:58:26 PM: warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
9:58:26 PM: warn  - No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
9:58:26 PM: Browserslist: caniuse-lite is outdated. Please run:
9:58:26 PM:   npx browserslist@latest --update-db
9:58:26 PM:   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
9:58:26 PM: info  - Linting and checking validity of types...
9:58:28 PM: Browserslist: caniuse-lite is outdated. Please run:
9:58:28 PM:   npx browserslist@latest --update-db
9:58:28 PM:   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
9:58:28 PM: info  - Creating an optimized production build...
9:58:29 PM: Browserslist: caniuse-lite is outdated. Please run:
9:58:29 PM:   npx browserslist@latest --update-db
9:58:29 PM:   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating

Hi @josiahbryan-com,

Thanks for reaching out and welcome to Netlify’s Support forums!

I see from the deploy log that the Netlify Next.js Runtime is missing, could you try adding the Netlify Next.js Runtime by following these instructions in the readme:

Let us know if you have any questions.

Hi! Thanks so much for that info! I’ve deployed NextJS sites before on Netlify and never had to manually add the NextJS plugin - interesting! Thank you for that link. I went ahead and added it (via the UI) and then retried the deploy (cleared cache) - but the deploy is currently “stuck” again at ~10 minutes and counting - should not take 10 minutes to build ~100 KB of assets haha

Here’s the deploy URL if it’s helpful: Netlify App - Here’s the new full log showing NextJS plugin activated, from the deploy just now:

11:07:49 AM: build-image version: 5f617b3b6e49674a7ec1e08b4f1549b08909a6af (focal)
11:07:49 AM: buildbot version: e57a7547192ed9aa0bcf3dbe320f6331e9d9d5ed
11:07:50 AM: Building without cache
11:07:50 AM: Starting to prepare the repo for build
11:07:51 AM: No cached dependencies found. Cloning fresh repo
11:07:51 AM: git clone --filter=blob:none https://github.com/josiahbryan/josiahbryan.com
11:07:51 AM: Preparing Git Reference refs/heads/master
11:07:55 AM: Parsing package.json dependencies
11:07:56 AM: Different build dir detected, going to use the one specified in the Netlify configuration file: 'spotlight' versus '' in the Netlify UI
11:07:56 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'spotlight/build' versus 'build/' in the Netlify UI
11:07:56 AM: Starting to install dependencies
11:07:56 AM: Attempting Ruby version 2.6.2, read from environment
11:07:57 AM: Required ruby-2.6.2 is not installed - installing.
11:07:57 AM: Searching for binary rubies, this might take some time.
11:07:57 AM: Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/20.04/x86_64/ruby-2.6.2.tar.bz2
11:07:57 AM: Checking requirements for ubuntu.
11:07:57 AM: Requirements installation successful.
11:07:57 AM: ruby-2.6.2 - #configure
11:07:57 AM: ruby-2.6.2 - #download
11:07:58 AM: ruby-2.6.2 - #validate archive
11:08:01 AM: ruby-2.6.2 - #extract
11:08:03 AM: ruby-2.6.2 - #validate binary
11:08:03 AM: ruby-2.6.2 - #setup
11:08:03 AM: ruby-2.6.2 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.6.2@global
11:08:03 AM: ruby-2.6.2 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems........................................
11:08:04 AM: ruby-2.6.2 - #generating global wrappers........
11:08:04 AM: ruby-2.6.2 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.6.2
11:08:04 AM: ruby-2.6.2 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
11:08:04 AM: ruby-2.6.2 - #generating default wrappers........
11:08:04 AM: Using /opt/buildhome/.rvm/gems/ruby-2.6.2
11:08:04 AM: Using Ruby version 2.6.2
11:08:05 AM: Using PHP version 8.0
11:08:06 AM: Downloading and installing node v14.4.0...
11:08:06 AM: Downloading https://nodejs.org/dist/v14.4.0/node-v14.4.0-linux-x64.tar.xz...
11:08:06 AM: Computing checksum with sha256sum
11:08:06 AM: Checksums matched!
11:08:08 AM: Now using node v14.4.0 (npm v6.14.5)
11:08:08 AM: Started restoring cached build plugins
11:08:08 AM: Finished restoring cached build plugins
11:08:08 AM: Started restoring cached corepack dependencies
11:08:08 AM: Finished restoring cached corepack dependencies
11:08:08 AM: No npm workspaces detected
11:08:08 AM: Started restoring cached node modules
11:08:08 AM: Finished restoring cached node modules
11:08:08 AM: Installing npm packages using npm version 6.14.5
11:08:24 AM: npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
11:08:24 AM: > core-js-pure@3.22.5 postinstall /opt/build/repo/spotlight/node_modules/core-js-pure
11:08:24 AM: > node -e "try{require('./postinstall')}catch(e){}"
11:08:24 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-android-arm64@13.0.2 (node_modules/@next/swc-android-arm64):
11:08:24 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-android-arm64@13.0.2: wanted {"os":"android","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
11:08:24 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-android-arm-eabi@13.0.2 (node_modules/@next/swc-android-arm-eabi):
11:08:24 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-android-arm-eabi@13.0.2: wanted {"os":"android","arch":"arm"} (current: {"os":"linux","arch":"x64"})
11:08:24 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-darwin-arm64@13.0.2 (node_modules/@next/swc-darwin-arm64):
11:08:24 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-darwin-arm64@13.0.2: wanted {"os":"darwin","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
11:08:24 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-freebsd-x64@13.0.2 (node_modules/@next/swc-freebsd-x64):
11:08:24 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-freebsd-x64@13.0.2: wanted {"os":"freebsd","arch":"x64"} (current: {"os":"linux","arch":"x64"})
11:08:24 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-darwin-x64@13.0.2 (node_modules/@next/swc-darwin-x64):
11:08:24 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-darwin-x64@13.0.2: wanted {"os":"darwin","arch":"x64"} (current: {"os":"linux","arch":"x64"})
11:08:24 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-linux-arm-gnueabihf@13.0.2 (node_modules/@next/swc-linux-arm-gnueabihf):
11:08:24 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-linux-arm-gnueabihf@13.0.2: wanted {"os":"linux","arch":"arm"} (current: {"os":"linux","arch":"x64"})
11:08:24 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-linux-arm64-gnu@13.0.2 (node_modules/@next/swc-linux-arm64-gnu):
11:08:24 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-linux-arm64-gnu@13.0.2: wanted {"os":"linux","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
11:08:24 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-linux-arm64-musl@13.0.2 (node_modules/@next/swc-linux-arm64-musl):
11:08:24 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-linux-arm64-musl@13.0.2: wanted {"os":"linux","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
11:08:24 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-win32-arm64-msvc@13.0.2 (node_modules/@next/swc-win32-arm64-msvc):
11:08:24 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-win32-arm64-msvc@13.0.2: wanted {"os":"win32","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
11:08:24 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-win32-ia32-msvc@13.0.2 (node_modules/@next/swc-win32-ia32-msvc):
11:08:24 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-win32-ia32-msvc@13.0.2: wanted {"os":"win32","arch":"ia32"} (current: {"os":"linux","arch":"x64"})
11:08:24 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-win32-x64-msvc@13.0.2 (node_modules/@next/swc-win32-x64-msvc):
11:08:24 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/swc-win32-x64-msvc@13.0.2: wanted {"os":"win32","arch":"x64"} (current: {"os":"linux","arch":"x64"})
11:08:24 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
11:08:24 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
11:08:24 AM: added 717 packages from 365 contributors and audited 729 packages in 15.283s
11:08:24 AM: 225 packages are looking for funding
11:08:24 AM:   run `npm fund` for details
11:08:24 AM: found 4 vulnerabilities (2 moderate, 2 high)
11:08:24 AM:   run `npm audit fix` to fix them, or `npm audit` for details
11:08:24 AM: npm packages installed
11:08:24 AM: Python version set to 3.8
11:08:25 AM: Started restoring cached go cache
11:08:25 AM: Finished restoring cached go cache
11:08:25 AM: go version go1.19.5 linux/amd64
11:08:25 AM: Install dependencies script success
11:08:25 AM: Starting build script
11:08:25 AM: Using stage install dependencies
11:08:26 AM: Detected 1 framework(s)
11:08:26 AM: "next" at version "13.0.2"
11:08:26 AM: Section completed: initializing
11:08:27 AM: ​
11:08:27 AM:   Netlify Build                                                 
11:08:27 AM: ────────────────────────────────────────────────────────────────
11:08:27 AM: ​
11:08:27 AM: ❯ Version
11:08:27 AM:   @netlify/build 29.9.0
11:08:27 AM: ​
11:08:27 AM: ❯ Flags
11:08:27 AM:   baseRelDir: true
11:08:27 AM:   buildId: 6425b3d3edd94f11967d06b3
11:08:27 AM:   deployId: 6425b3d3edd94f11967d06b5
11:08:27 AM: ​
11:08:27 AM: ❯ Current directory
11:08:27 AM:   /opt/build/repo/spotlight
11:08:27 AM: ​
11:08:27 AM: ❯ Config file
11:08:27 AM:   /opt/build/repo/netlify.toml
11:08:27 AM: ​
11:08:27 AM: ❯ Context
11:08:27 AM:   production
11:08:28 AM: ​
11:08:28 AM: ❯ Installing plugins
11:08:28 AM:    - @netlify/plugin-nextjs@4.33.0
11:08:39 AM: ​
11:08:39 AM: ❯ Using Next.js Runtime - v4.33.0
11:08:40 AM: ​
11:08:40 AM:   1. @netlify/plugin-nextjs (onPreBuild event)                  
11:08:40 AM: ────────────────────────────────────────────────────────────────
11:08:40 AM: ​
11:08:40 AM: No Next.js cache to restore.
11:08:40 AM: Netlify configuration property "build.environment.NEXT_PRIVATE_TARGET" value changed.
11:08:40 AM: ​
11:08:40 AM: (@netlify/plugin-nextjs onPreBuild completed in 27ms)
11:08:40 AM: ​
11:08:40 AM:   2. build.command from netlify.toml                            
11:08:40 AM: ────────────────────────────────────────────────────────────────
11:08:40 AM: ​
11:08:40 AM: $ npm run build
11:08:40 AM: > tailwindui-template@0.1.0 build /opt/build/repo/spotlight
11:08:40 AM: > next build
11:08:41 AM: warn  - You have enabled experimental feature (scrollRestoration) in next.config.mjs.
11:08:41 AM: warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
11:08:41 AM: warn  - No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
11:08:41 AM: Browserslist: caniuse-lite is outdated. Please run:
11:08:41 AM:   npx browserslist@latest --update-db
11:08:41 AM:   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
11:08:41 AM: info  - Linting and checking validity of types...
11:08:43 AM: Browserslist: caniuse-lite is outdated. Please run:
11:08:43 AM:   npx browserslist@latest --update-db
11:08:43 AM:   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
11:08:43 AM: info  - Creating an optimized production build...
11:08:44 AM: Browserslist: caniuse-lite is outdated. Please run:
11:08:44 AM:   npx browserslist@latest --update-db
11:08:44 AM:   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating

Hmm, based on the logs you shared one possible reason for the delay could be related to the number of dependencies. It seems like the build process is installing several dependencies, including Ruby, Node.js, and PHP. If you have many dependencies in your project, it might take some time to install all of them, which could cause the build process to take longer.

You mentioned you cleared your cache could you try using cache to speed up the build time?