Error when building large site

  • We need to know your netlify site name. Example: monumental-daifuku-85326d
  • Build problems? I thought the problem was due to build time because on local it takes like 20 minutes I asked for an increase in build-time ad it seems that is not the issue. In previous deploy it was working fine.

Log First part

11:11:12 AM: build-image version: 3ffff9df3d5419545acc1b673a54de348174406d (focal)
11:11:12 AM: buildbot version: 4613af4169363e3b38cfadfa4665d34cd1d1427b
11:11:12 AM: Building without cache
11:11:12 AM: Starting to prepare the repo for build
11:11:12 AM: No cached dependencies found. Cloning fresh repo
11:11:12 AM: git clone --filter=blob:none https://github.com/BrahianVT/docode
11:11:13 AM: Preparing Git Reference refs/heads/master
11:11:23 AM: Starting to install dependencies
11:11:23 AM: Python version set to 3.8
11:11:23 AM: Attempting Ruby version 2.7.2, read from environment
11:11:24 AM: Using Ruby version 2.7.2
11:11:24 AM: Started restoring cached go cache
11:11:24 AM: Finished restoring cached go cache
11:11:26 AM: go version go1.19.13 linux/amd64
11:11:26 AM: Using PHP version 8.0
11:11:27 AM: Downloading and installing node v20.10.0...
11:11:27 AM: Downloading https://nodejs.org/dist/v20.10.0/node-v20.10.0-linux-x64.tar.xz...
11:11:27 AM: Computing checksum with sha256sum
11:11:28 AM: Checksums matched!
11:11:30 AM: Now using node v20.10.0 (npm v10.2.3)
11:11:30 AM: Enabling Node.js Corepack
11:11:30 AM: Started restoring cached build plugins
11:11:30 AM: Finished restoring cached build plugins
11:11:30 AM: Started restoring cached corepack dependencies
11:11:30 AM: Finished restoring cached corepack dependencies
11:11:30 AM: No npm workspaces detected
11:11:30 AM: Started restoring cached node modules
11:11:30 AM: Finished restoring cached node modules
11:11:30 AM: Installing npm packages using npm version 10.2.3
11:11:42 AM: added 303 packages, and audited 304 packages in 11s
11:11:42 AM: 55 packages are looking for funding
11:11:42 AM:   run `npm fund` for details
11:11:42 AM: found 0 vulnerabilities
11:11:42 AM: npm packages installed
11:11:42 AM: Successfully installed dependencies
11:11:42 AM: Starting build script
11:11:43 AM: Detected 1 framework(s)
11:11:43 AM: "eleventy" at version "2.0.1"
11:11:43 AM: Section completed: initializing
11:11:45 AM: ​
11:11:45 AM: Netlify Build                                                 
11:11:45 AM: ────────────────────────────────────────────────────────────────
11:11:45 AM: ​
11:11:45 AM: ❯ Version
11:11:45 AM:   @netlify/build 29.31.1
11:11:45 AM: ​
11:11:45 AM: ❯ Flags
11:11:45 AM:   baseRelDir: true
11:11:45 AM:   buildId: 65807d2ecd7a7c6cc8ddb39b
11:11:45 AM:   deployId: 65807d2ecd7a7c6cc8ddb39d
11:11:45 AM: ​
11:11:45 AM: ❯ Current directory
11:11:45 AM:   /opt/build/repo
11:11:45 AM: ​
11:11:45 AM: ❯ Config file
11:11:45 AM:   No config file was defined: using default values.
11:11:45 AM: ​
11:11:45 AM: ❯ Context
11:11:45 AM:   production
11:11:45 AM: ​
11:11:45 AM: Build command from Netlify app                                
11:11:45 AM: ────────────────────────────────────────────────────────────────
11:11:45 AM: ​
11:11:45 AM: $ CI= npm run build
11:11:45 AM: > do-code@1.0.0 build
11:11:45 AM: > npm run css:build && npm run 11ty:build
11:11:45 AM: > do-code@1.0.0 css:build
11:11:45 AM: > tailwindcss -i src/assets/css/main.css -o dist/assets/css/main.css -m
11:11:46 AM: Rebuilding...
11:11:46 AM: Done in 543ms.
11:11:47 AM: > do-code@1.0.0 11ty:build
11:11:47 AM: > cross-env NODE_ENV=production eleventy

The log final part

1:25:44 AM: [11ty] Writing dist/How_to_resolve_the_algorithm_CSV_to_HTML_translation_step_by_step__in_the_Oberon-2_programming_language/index.html from ./src/posts/How_to_resolve_the_algorithm_CSV_to_HTML_translation_step_by_step__in_the_Oberon-2_programming_language.md (njk)
11:25:44 AM: [11ty] Writing dist/How_to_resolve_the_algorithm_CSV_to_HTML_translation_step_by_step__in_the_OpenEdgeProgress_programming_language/index.html from ./src/posts/How_to_resolve_the_algorithm_CSV_to_HTML_translation_step_by_step__in_the_OpenEdgeProgress_programming_language.md (njk)
11:25:44 AM: [11ty] Writing dist/How_to_resolve_the_algorithm_CSV_to_HTML_translation_step_by_step__in_the_Perl_programming_language/index.html from ./src/posts/How_to_resolve_the_algorithm_CSV_to_HTML_translation_step_by_step__in_the_Perl_programming_language.md (njk)
11:26:19 AM: [11ty] Writing dist/How_to_resolve_the_algorithm_CSV_to_HTML_translation_step_by_step__in_the_PHP_programming_language/index.html from ./src/posts/How_to_resolve_​
11:26:19 AM: "build.command" failed                                        
11:26:19 AM: ────────────────────────────────────────────────────────────────
11:26:19 AM: ​
11:26:19 AM:   Error message
11:26:19 AM:   Command failed with exit code 1: CI= npm run build (https://ntl.fyi/exit-code-1)
11:26:19 AM: ​
11:26:19 AM:   Error location
11:26:19 AM:   In Build command from Netlify app:
11:26:19 AM:   CI= npm run build
11:26:19 AM: ​
11:26:19 AM:   Resolved config
11:26:19 AM:   build:
11:26:19 AM:     command: CI= npm run build
11:26:19 AM:     commandOrigin: ui
11:26:19 AM:     environment:
11:26:19 AM:       - CI
11:26:19 AM:       - NODE_OPTIONS
11:26:19 AM:     publish: /opt/build/repo/dist
11:26:19 AM:     publishOrigin: ui
11:26:20 AM: Failed during stage "building site": Build script returned non-zero exit code: 2
11:26:20 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:26:20 AM: Failing build: Failed to build site
11:26:20 AM: Finished processing build request in 15m8.091s```

@luke I was checking here: [Support Guide] Frequently encountered problems during builds
but without success, the whole log is very large , I tried to find some missing dependencies or time outs without luck, here is the log:
https://gist.githubusercontent.com/BrahianVT/79956cfb221edec520219ced823ddcbe/raw/f4aff7e42d6c640a884dbbb3a93d0b007ddf5778/gistfile1.txt

Hi, @pumasemj. The Netlify support team cannot debug your code for you. This is not covered in the scope of our support:

Our support team will debug Netlify’s services and the code we write. However, third-party code and any code you write are not covered by our support scope.

However, someone else on this support forum may have the time to debug this code and you are free to ask this question here that reason. However, it might help to ask about this in a different forum specifically devoted to debugging Node.js programs.

@luke well I don’t asked to debug my code just I would like to get more detailed logs, I already checked my logs! and there is nothing wrong with them, just the generic error, we are not magicians to guess.

  Error message
1:12:09 PM:   Command failed with exit code 1: CI="" npm run build && ps auxw ; false (https://ntl.fyi/exit-code-1)
1:12:09 PM: ​
1:12:09 PM:   Error location
1:12:09 PM:   In Build command from Netlify app:
1:12:09 PM:   CI="" npm run build && ps auxw ; false
1:12:09 PM: ​
1:12:09 PM:   Resolved config
1:12:09 PM:   build:
1:12:09 PM:     command: CI="" npm run build && ps auxw ; false
1:12:09 PM:     commandOrigin: ui
1:12:09 PM:     environment:
1:12:09 PM:       - CI
1:12:09 PM:       - NETLIFY_BUILD_DEBUG
1:12:09 PM:       - NODE_OPTIONS
1:12:09 PM:     publish: /opt/build/repo/dist
1:12:09 PM:     publishOrigin: ui
1:12:10 PM: Build failed due to a user error: Build script returned non-zero exit code: 2

All is good the first phase the initializing part, and after that the problem was in the part of Building
with the error above and nothing else.
I already was checking for the same error in stackoverflow or here in this forum with no luck.

Hi, @pumasemj. There are no questions in your response. What are you asking for help with? Are you asking how to get more verbose logs? If so, it is your code not logging verbosely so this is still a question about your code and not a question about Netlify.

We recommend adding console.log() and console.time() methods to the code in question to get more information about what the code is doing and where the error is occurring. Again, that must be done in the code with the error and that code is not controlled by Netlify so we cannot do that for you.