Getting "build.command" failed when deploying Webflow converted site

Hi dear community ! I’m usually developing sites in Webflow, then converting them with Udesly and deploying here on Netlify. Today I had an issue I cant seem to resolve, I’m constantly getting the β€œbuild.command” failed
Error message: Command failed with exit code 1: DEBUG=* eleventy

Error location: In build.command from netlify.toml: DEBUG=* eleventy

Could you please be so kind and help me resolve this?

Here is the log

8:36:29 AM: Build ready to start

8:36:31 AM: build-image version: be42e453d6c8f171cc2f654acc29c0a8b60e6d93
8:36:31 AM: build-image tag: v3.7.1
8:36:31 AM: buildbot version: 6701b303fe187b6e99d4f597cb578b3348369cc2
8:36:31 AM: Fetching cached dependencies
8:36:31 AM: Failed to fetch cache, continuing with build
8:36:31 AM: Starting to prepare the repo for build
8:36:32 AM: No cached dependencies found. Cloning fresh repo
8:36:32 AM: git clone https://github.com/sretja/first-round-management-udy-theme-master
8:36:35 AM: Preparing Git Reference refs/heads/master
8:36:36 AM: Starting build script
8:36:36 AM: Installing dependencies
8:36:36 AM: Python version set to 2.7
8:36:38 AM: v12.18.0 is already installed.
8:36:38 AM: Now using node v12.18.0 (npm v6.14.4)
8:36:38 AM: Started restoring cached build plugins
8:36:38 AM: Finished restoring cached build plugins
8:36:39 AM: Attempting ruby version 2.7.1, read from environment
8:36:40 AM: Using ruby version 2.7.1
8:36:40 AM: Using PHP version 5.6
8:36:40 AM: Started restoring cached node modules
8:36:40 AM: Finished restoring cached node modules
8:36:41 AM: Installing NPM modules using NPM version 6.14.4
8:36:45 AM: npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (ReDos Vulnerability Regression Visibility Notice Β· Issue #797 Β· visionmedia/debug Β· GitHub)
8:36:47 AM: npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
8:36:56 AM: > sharp@0.26.3 install /opt/build/repo/node_modules/sharp
8:36:56 AM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
8:36:58 AM: info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.0/libvips-8.10.0-linux-x64.tar.br
8:37:00 AM: > core-js@2.6.12 postinstall /opt/build/repo/node_modules/core-js
8:37:00 AM: > node -e β€œtry{require(’./postinstall’)}catch(e){}”
8:37:00 AM: > ejs@2.7.4 postinstall /opt/build/repo/node_modules/ejs
8:37:00 AM: > node ./postinstall.js
8:37:00 AM: npm notice created a lockfile as package-lock.json. You should commit this file.
8:37:00 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/chokidar/node_modules/fsevents):
8:37:00 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {β€œos”:β€œdarwin”,β€œarch”:β€œany”} (current: {β€œos”:β€œlinux”,β€œarch”:β€œx64”})
8:37:00 AM: npm WARN first-round-management-udy-theme@ No repository field.
8:37:00 AM: npm WARN first-round-management-udy-theme@ No license field.
8:37:00 AM: added 456 packages from 570 contributors and audited 458 packages in 18.739s
8:37:00 AM: 26 packages are looking for funding
8:37:00 AM: run npm fund for details
8:37:00 AM: found 1 high severity vulnerability
8:37:00 AM: run npm audit fix to fix them, or npm audit for details
8:37:00 AM: NPM modules installed
8:37:01 AM: Started restoring cached go cache
8:37:01 AM: Finished restoring cached go cache
8:37:01 AM: go version go1.14.4 linux/amd64
8:37:01 AM: go version go1.14.4 linux/amd64
8:37:01 AM: Installing missing commands
8:37:01 AM: Verify run directory
8:37:02 AM: ​
8:37:02 AM: ────────────────────────────────────────────────────────────────
8:37:02 AM: Netlify Build
8:37:02 AM: ────────────────────────────────────────────────────────────────
8:37:02 AM: ​
8:37:02 AM: ❯ Version
8:37:02 AM: @netlify/build 10.2.5
8:37:02 AM: ​
8:37:02 AM: ❯ Flags
8:37:02 AM: deployId: 606ea46df6fd255ddb358110
8:37:02 AM: ​
8:37:02 AM: ❯ Current directory
8:37:02 AM: /opt/build/repo
8:37:02 AM: ​
8:37:02 AM: ❯ Config file
8:37:02 AM: /opt/build/repo/netlify.toml
8:37:02 AM: ​
8:37:02 AM: ❯ Context
8:37:02 AM: production
8:37:03 AM: ​
8:37:03 AM: ────────────────────────────────────────────────────────────────
8:37:03 AM: 1. build.command from netlify.toml
8:37:03 AM: ────────────────────────────────────────────────────────────────
8:37:03 AM: ​
8:37:03 AM: $ eleventy
8:37:04 AM: Problem writing Eleventy templates: (more in DEBUG output)
8:37:04 AM: > Cannot read property β€˜replace’ of undefined
8:37:04 AM: TypeError was thrown:
8:37:04 AM: TypeError: Cannot read property β€˜replace’ of undefined
8:37:04 AM: at /opt/build/repo/_utils/filters.js:420:62
8:37:04 AM: at Array.forEach ()
8:37:04 AM: at Object._variations (/opt/build/repo/_utils/filters.js:372:11)
8:37:04 AM: at TemplateMap.getUserConfigCollection (/opt/build/repo/node_modules/@11ty/eleventy/src/TemplateMap.js:453:47)
8:37:04 AM: at TemplateMap.initDependencyMap (/opt/build/repo/node_modules/@11ty/eleventy/src/TemplateMap.js:238:54)
8:37:04 AM: at processTicksAndRejections (internal/process/task_queues.js:97:5)
8:37:04 AM: at async TemplateMap.cache (/opt/build/repo/node_modules/@11ty/eleventy/src/TemplateMap.js:282:5)
8:37:04 AM: at async TemplateWriter._createTemplateMap (/opt/build/repo/node_modules/@11ty/eleventy/src/TemplateWriter.js:170:5)
8:37:04 AM: at async TemplateWriter.writeTemplates (/opt/build/repo/node_modules/@11ty/eleventy/src/TemplateWriter.js:203:5)
8:37:04 AM: at async TemplateWriter.write (/opt/build/repo/node_modules/@11ty/eleventy/src/TemplateWriter.js:254:25)
8:37:04 AM: Copied 2 files / Wrote 0 files in 0.73 seconds (v0.11.1)
8:37:04 AM: ​
8:37:04 AM: ────────────────────────────────────────────────────────────────
8:37:04 AM: β€œbuild.command” failed
8:37:04 AM: ────────────────────────────────────────────────────────────────
8:37:04 AM: ​
8:37:04 AM: Error message
8:37:04 AM: Command failed with exit code 1: eleventy
8:37:04 AM: ​
8:37:04 AM: Error location
8:37:04 AM: In build.command from netlify.toml:
8:37:04 AM: eleventy
8:37:04 AM: ​
8:37:04 AM: Resolved config
8:37:04 AM: build:
8:37:04 AM: command: eleventy
8:37:04 AM: commandOrigin: config
8:37:04 AM: publish: /opt/build/repo/public
8:37:04 AM: Caching artifacts
8:37:04 AM: Started saving node modules
8:37:04 AM: Finished saving node modules
8:37:04 AM: Started saving build plugins
8:37:04 AM: Finished saving build plugins
8:37:04 AM: Started saving pip cache
8:37:04 AM: Finished saving pip cache
8:37:04 AM: Started saving emacs cask dependencies
8:37:04 AM: Finished saving emacs cask dependencies
8:37:04 AM: Started saving maven dependencies
8:37:05 AM: Finished saving maven dependencies
8:37:05 AM: Started saving boot dependencies
8:37:05 AM: Finished saving boot dependencies
8:37:05 AM: Started saving rust rustup cache
8:37:05 AM: Finished saving rust rustup cache
8:37:05 AM: Started saving go dependencies
8:37:05 AM: Finished saving go dependencies
8:37:07 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
8:37:07 AM: Failed during stage β€˜building site’: Build script returned non-zero exit code: 2
8:37:07 AM: Failing build: Failed to build site
8:37:08 AM: Finished processing build request in 36.336701204s

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:

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!