Home
Support Forums

Site won't deploy

Hi,

my site won’t deploy. It’s giving me this error:

11:49:37 AM: Build ready to start
11:49:39 AM: build-image version: c5b01a919d3e16af69445c5de0cacb49efbb1a23 (focal)
11:49:39 AM: build-image tag: v4.4.0
11:49:39 AM: buildbot version: 8511f0f084c05704fd035b9cf5b612081353f86f
11:49:39 AM: Building without cache
11:49:39 AM: Starting to prepare the repo for build
11:49:39 AM: No cached dependencies found. Cloning fresh repo
11:49:39 AM: git clone https://github.com/Madute/wilec3-udy-theme
11:49:41 AM: Preparing Git Reference refs/heads/master
11:49:42 AM: Parsing package.json dependencies
11:49:42 AM: Different build command detected, going to use the one specified in the Netlify configuration file: ‘eleventy’ versus ‘npm run build’ in the Netlify UI
11:49:42 AM: Starting build script
11:49:42 AM: Installing dependencies
11:49:42 AM: Python version set to 2.7
11:49:43 AM: Downloading and installing node v16.13.0…
11:49:44 AM: Downloading https://nodejs.org/dist/v16.13.0/node-v16.13.0-linux-x64.tar.xz
11:49:44 AM: Computing checksum with sha256sum
11:49:44 AM: Checksums matched!
11:49:47 AM: Now using node v16.13.0 (npm v8.1.0)
11:49:48 AM: Started restoring cached build plugins
11:49:48 AM: Finished restoring cached build plugins
11:49:48 AM: Attempting ruby version 2.7.2, read from environment
11:49:49 AM: Using ruby version 2.7.2
11:49:50 AM: Using PHP version 8.0
11:49:50 AM: Started restoring cached node modules
11:49:50 AM: Finished restoring cached node modules
11:49:50 AM: Installing NPM modules using NPM version 8.1.0
11:50:06 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)
11:50:06 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)
11:50:06 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)
11:50:08 AM: npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
11:50:19 AM: added 459 packages, and audited 460 packages in 28s
11:50:19 AM: 27 packages are looking for funding
11:50:19 AM: run npm fund for details
11:50:19 AM: 2 high severity vulnerabilities
11:50:19 AM: To address all issues (including breaking changes), run:
11:50:19 AM: npm audit fix --force
11:50:19 AM: Run npm audit for details.
11:50:19 AM: NPM modules installed
11:50:19 AM: Started restoring cached go cache
11:50:19 AM: Finished restoring cached go cache
11:50:19 AM: go version go1.16.5 linux/amd64
11:50:19 AM: go version go1.16.5 linux/amd64
11:50:19 AM: Installing missing commands
11:50:19 AM: Verify run directory
11:50:21 AM: ​
11:50:21 AM: ────────────────────────────────────────────────────────────────
11:50:21 AM: Netlify Build
11:50:21 AM: ────────────────────────────────────────────────────────────────
11:50:21 AM: ​
11:50:21 AM: ❯ Version
11:50:21 AM: @netlify/build 18.21.8
11:50:21 AM: ​
11:50:21 AM: ❯ Flags
11:50:21 AM: baseRelDir: true
11:50:21 AM: buildId: 618a443186a47613bd920f7c
11:50:21 AM: deployId: 618a443186a47613bd920f7e
11:50:21 AM: ​
11:50:21 AM: ❯ Current directory
11:50:21 AM: /opt/build/repo
11:50:21 AM: ​
11:50:21 AM: ❯ Config file
11:50:21 AM: /opt/build/repo/netlify.toml
11:50:21 AM: ​
11:50:21 AM: ❯ Context
11:50:21 AM: production
11:50:21 AM: ​
11:50:21 AM: ────────────────────────────────────────────────────────────────
11:50:21 AM: 1. build.command from netlify.toml
11:50:21 AM: ────────────────────────────────────────────────────────────────
11:50:21 AM: ​
11:50:21 AM: $ eleventy
11:50:22 AM: Problem writing Eleventy templates: (more in DEBUG output)
11:50:22 AM: > Having trouble rendering njk template ./site/pages/sitemap.njk
11:50:22 AM: TemplateContentRenderError was thrown
11:50:22 AM: > (./site/pages/sitemap.njk) [Line 5, Column 37]
11:50:22 AM: RangeError: Invalid time value
11:50:22 AM: Template render error was thrown:
11:50:22 AM: Template render error: (./site/pages/sitemap.njk) [Line 5, Column 37]
11:50:22 AM: RangeError: Invalid time value
11:50:22 AM: at Object._prettifyError (/opt/build/repo/node_modules/nunjucks/src/lib.js:36:11)
11:50:22 AM: at /opt/build/repo/node_modules/nunjucks/src/environment.js:563:19
11:50:22 AM: at Template.root [as rootRenderFunc] (eval at _compile (/opt/build/repo/node_modules/nunjucks/src/environment.js:633:18), :41:3)
11:50:22 AM: at Template.render (/opt/build/repo/node_modules/nunjucks/src/environment.js:552:10)
11:50:22 AM: at /opt/build/repo/node_modules/@11ty/eleventy/src/Engines/Nunjucks.js:236:14
11:50:22 AM: at new Promise ()
11:50:22 AM: at /opt/build/repo/node_modules/@11ty/eleventy/src/Engines/Nunjucks.js:235:14
11:50:22 AM: at Template.render (/opt/build/repo/node_modules/@11ty/eleventy/src/TemplateContent.js:199:28)
11:50:22 AM: at async Template._getContent (/opt/build/repo/node_modules/@11ty/eleventy/src/Template.js:547:12)
11:50:22 AM: at async Template.getTemplateMapContent (/opt/build/repo/node_modules/@11ty/eleventy/src/Template.js:732:19)
11:50:22 AM: Copied 138 files / Wrote 0 files in 1.03 seconds (v0.11.1)
11:50:22 AM: ​
11:50:22 AM: ────────────────────────────────────────────────────────────────
11:50:22 AM: “build.command” failed
11:50:22 AM: ────────────────────────────────────────────────────────────────
11:50:22 AM: ​
11:50:22 AM: Error message
11:50:22 AM: Command failed with exit code 1: eleventy
11:50:22 AM: ​
11:50:22 AM: Error location
11:50:22 AM: In build.command from netlify.toml:
11:50:22 AM: eleventy
11:50:22 AM: ​
11:50:22 AM: Resolved config
11:50:22 AM: build:
11:50:22 AM: command: eleventy
11:50:22 AM: commandOrigin: config
11:50:22 AM: publish: /opt/build/repo/public
11:50:22 AM: publishOrigin: config
11:50:22 AM: functionsDirectory: /opt/build/repo/functions
11:50:23 AM: Caching artifacts
11:50:23 AM: Started saving node modules
11:50:23 AM: Finished saving node modules
11:50:23 AM: Started saving build plugins
11:50:23 AM: Finished saving build plugins
11:50:23 AM: Started saving pip cache
11:50:23 AM: Finished saving pip cache
11:50:23 AM: Started saving emacs cask dependencies
11:50:23 AM: Finished saving emacs cask dependencies
11:50:23 AM: Started saving maven dependencies
11:50:23 AM: Finished saving maven dependencies
11:50:23 AM: Started saving boot dependencies
11:50:23 AM: Finished saving boot dependencies
11:50:23 AM: Started saving rust rustup cache
11:50:23 AM: Finished saving rust rustup cache
11:50:23 AM: Started saving go dependencies
11:50:23 AM: Finished saving go dependencies
11:50:25 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:50:25 AM: Creating deploy upload records
11:50:25 AM: Failing build: Failed to build site
11:50:26 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
11:50:26 AM: Finished processing build request in 46.940720646s

Here’s my repository link:

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!

The error indicates there’s something wrong with your nunjucks template ./site/pages/sitemap.njk around Line 5, Column 37.

I’d check that out and see if fixing it resolves the subsequent error.