Maximum Runtime exceeds [Next.js]

Hi everyone, hope you are doing well.

I’m having issues on my site, on the building part. My site is happy-mcnulty-e8f9df
The Github repo is the following: GitHub - Caweca105/portfolio (it’s public)

Below you’ll find the build log :slight_smile: thank you for your time

1:24:07 PM: Build ready to start
1:24:10 PM: build-image version: d2c6dbeac570350a387d832f64bc980dc964ad65 (focal)
1:24:10 PM: build-image tag: v4.8.0
1:24:10 PM: buildbot version: 5271e9715084f43bb9084ec0da517d4a5a908ada
1:24:10 PM: Fetching cached dependencies
1:24:10 PM: Failed to fetch cache, continuing with build
1:24:10 PM: Starting to prepare the repo for build
1:24:11 PM: No cached dependencies found. Cloning fresh repo
1:24:11 PM: git clone GitHub - Caweca105/portfolio
1:24:12 PM: Preparing Git Reference refs/heads/Main
1:24:12 PM: Parsing package.json dependencies
1:24:13 PM: Starting build script
1:24:13 PM: Installing dependencies
1:24:13 PM: Python version set to 2.7
1:24:14 PM: Downloading and installing node v16.15.0…
1:24:14 PM: Downloading https://nodejs.org/dist/v16.15.0/node-v16.15.0-linux-x64.tar.xz
1:24:15 PM: Computing checksum with sha256sum
1:24:15 PM: Checksums matched!
1:24:18 PM: Now using node v16.15.0 (npm v8.5.5)
1:24:18 PM: Started restoring cached build plugins
1:24:18 PM: Finished restoring cached build plugins
1:24:19 PM: Attempting ruby version 2.7.2, read from environment
1:24:20 PM: Using ruby version 2.7.2
1:24:20 PM: Using PHP version 8.0
1:24:21 PM: No npm workspaces detected
1:24:21 PM: Started restoring cached node modules
1:24:21 PM: Finished restoring cached node modules
1:24:21 PM: Installing NPM modules using NPM version 8.5.5
1:24:28 PM: npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
1:24:33 PM: npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
1:24:40 PM: added 627 packages, and audited 628 packages in 19s
1:24:40 PM: 94 packages are looking for funding
1:24:40 PM: run npm fund for details
1:24:40 PM: 1 moderate severity vulnerability
1:24:40 PM: To address all issues (including breaking changes), run:
1:24:40 PM: npm audit fix --force
1:24:40 PM: Run npm audit for details.
1:24:40 PM: NPM modules installed
1:24:41 PM: Started restoring cached go cache
1:24:41 PM: Finished restoring cached go cache
1:24:41 PM: go version go1.16.5 linux/amd64
1:24:41 PM: go version go1.16.5 linux/amd64
1:24:41 PM: Installing missing commands
1:24:41 PM: Verify run directory
1:24:43 PM: ​
1:24:43 PM: ────────────────────────────────────────────────────────────────
1:24:43 PM: Netlify Build
1:24:43 PM: ────────────────────────────────────────────────────────────────
1:24:43 PM: ​
1:24:43 PM: ❯ Version
1:24:43 PM: @netlify/build 27.0.1
1:24:43 PM: ​
1:24:43 PM: ❯ Flags
1:24:43 PM: baseRelDir: true
1:24:43 PM: buildId: 626fcd670b43700009930139
1:24:43 PM: deployId: 626fcd670b4370000993013b
1:24:43 PM: ​
1:24:43 PM: ❯ Current directory
1:24:43 PM: /opt/build/repo
1:24:43 PM: ​
1:24:43 PM: ❯ Config file
1:24:43 PM: No config file was defined: using default values.
1:24:43 PM: ​
1:24:43 PM: ❯ Context
1:24:43 PM: production
1:24:43 PM: ​
1:24:43 PM: ❯ Installing plugins
1:24:43 PM: - @netlify/plugin-nextjs@4.6.0
1:24:57 PM: ​
1:24:57 PM: ❯ Loading plugins
1:24:57 PM: - @netlify/plugin-nextjs@4.6.0 from Netlify app
1:24:59 PM: ​
1:24:59 PM: ────────────────────────────────────────────────────────────────
1:24:59 PM: 1. @netlify/plugin-nextjs (onPreBuild event)
1:24:59 PM: ────────────────────────────────────────────────────────────────
1:24:59 PM: ​
1:24:59 PM: No Next.js cache to restore.
1:24:59 PM: Netlify configuration property “build.environment.NEXT_PRIVATE_TARGET” value changed.
1:24:59 PM: ​
1:24:59 PM: (@netlify/plugin-nextjs onPreBuild completed in 22ms)
1:24:59 PM: ​
1:24:59 PM: ────────────────────────────────────────────────────────────────
1:24:59 PM: 2. Build command from Netlify app
1:24:59 PM: ────────────────────────────────────────────────────────────────
1:24:59 PM: ​
1:24:59 PM: $ CI=‘’ npm run build
1:25:00 PM: > portfolio@1.0.8 build
1:25:00 PM: > npm run dev
1:25:00 PM: > portfolio@1.0.8 dev
1:25:00 PM: > next dev -H 0.0.0.0
1:25:01 PM: ready - started server on 0.0.0.0:3000, url: http://localhost:3000
1:25:01 PM: info - Using webpack 5. Reason: Enabled by default webpack5 | Next.js
1:25:18 PM: event - compiled successfully
2:00:08 PM: wait - compiling…
2:00:08 PM: Build exceeded maximum allowed runtime
2:00:09 PM: event - compiled successfully
2:00:09 PM: wait - compiling…
2:00:09 PM: event - compiled successfully
2:00:09 PM: wait - compiling…
2:00:09 PM: error - Module not found: Error: Can’t resolve ‘./node_modules/next/dist/client/dev/amp-dev’ in ‘/opt/build/repo’
wait - compiling…
2:00:09 PM: [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: ENOENT: no such file or directory, stat ‘/opt/build/repo/.next/cache/webpack/client-development/0.pack’
2:00:09 PM: [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: ENOENT: no such file or directory, stat ‘/opt/build/repo/.next/cache/webpack/server-development/0.pack’

Hiya, sorry you are having trouble with your build.

This Support Guide contains a ton of useful debugging tips that can likely help you solve your problem :slight_smile: Additionally, this Support Guide houses all of our resources for debugging build and deploy issues.

We also recommend trying to search the forums with the build error you encountered - it’s likely your question was already asked by someone else!

If you are still having problems, please provide as much information as you can on what you have already tried, what your build settings are, your package.json, etc. Thanks!

is definitely the source of your problems.