Could anyone help me debug Hugo?

I need advice to debug deploy Netlify App

And what I write in Github:

[build]
  command = "hugo"
  publish = "public"

[build.environment]
  HUGO_VERSION = "0.75.1"
  HUGO_ENABLEGITINFO = "true"

[context.production.environment]
  HUGO_ENV = "production"
  
[context.split1]
command = "hugo --enableGitInfo"

[context.deploy-preview]
  command = "hugo --buildFuture -b $DEPLOY_PRIME_URL"
  
[context.deploy-preview.environment]
HUGO_VERSION = "0.75.1"

[context.branch-deploy]
  command = "hugo -b $DEPLOY_PRIME_URL"
  
[context.branch-deploy.environment]
HUGO_VERSION = "0.75.1"

[context.next.environment]
HUGO_ENABLEGITINFO = "true"

[[headers]]
  for = "*.webmanifest"
  [headers.values]
    Content-Type = "application/manifest+json; charset=UTF-8"

[[headers]]
  for = "index.xml"
  [headers.values]
    Content-Type = "application/rss+xml"

Hi, I’m unable to access your deploy page. Could you just paste the log here?

SURE!thank you.

5:20:31 PM: Build ready to start
5:20:33 PM: build-image version: b0258b965567defc4a2d7e2f2dec2e00c8f73ad6
5:20:33 PM: build-image tag: v3.4.1
5:20:33 PM: buildbot version: 9c8ae11ff96d61099561d579a91d03dc24930de5
5:20:33 PM: Fetching cached dependencies
5:20:33 PM: Starting to download cache of 97.5MB
5:20:34 PM: Finished downloading cache in 732.34659ms
5:20:34 PM: Starting to extract cache
5:20:37 PM: Finished extracting cache in 3.252792135s
5:20:37 PM: Finished fetching cache in 4.013994283s
5:20:37 PM: Starting to prepare the repo for build
5:20:38 PM: Preparing Git Reference refs/heads/master
5:20:40 PM: Starting build script
5:20:40 PM: Installing dependencies
5:20:40 PM: Python version set to 2.7
5:20:40 PM: Started restoring cached node version
5:20:43 PM: Finished restoring cached node version
5:20:44 PM: v12.18.0 is already installed.
5:20:45 PM: Now using node v12.18.0 (npm v6.14.4)
5:20:45 PM: Started restoring cached build plugins
5:20:45 PM: Finished restoring cached build plugins
5:20:45 PM: Attempting ruby version 2.7.1, read from environment
5:20:46 PM: Using ruby version 2.7.1
5:20:46 PM: Using PHP version 5.6
5:20:46 PM: 5.2 is already installed.
5:20:47 PM: Using Swift version 5.2
5:20:47 PM: Installing Hugo 0.75.1
5:20:47 PM: Hugo Static Site Generator v0.75.1-A4A7BAB7/extended linux/amd64 BuildDate: 2020-09-15T06:57:20Z
5:20:47 PM: Started restoring cached go cache
5:20:47 PM: Finished restoring cached go cache
5:20:47 PM: go version go1.14.4 linux/amd64
5:20:47 PM: go version go1.14.4 linux/amd64
5:20:47 PM: Installing missing commands
5:20:47 PM: Verify run directory
5:20:48 PM: ​
5:20:48 PM: ┌─────────────────────────────┐
5:20:48 PM: │ Netlify Build │
5:20:48 PM: └─────────────────────────────┘
5:20:48 PM: ​
5:20:48 PM: ❯ Version
5:20:48 PM: @netlify/build 5.2.1
5:20:48 PM: ​
5:20:48 PM: ❯ Flags
5:20:48 PM: deployId: 5fa2d4cfab643e0007ea8572
5:20:48 PM: mode: buildbot
5:20:48 PM: ​
5:20:48 PM: ❯ Current directory
5:20:48 PM: /opt/build/repo
5:20:48 PM: ​
5:20:48 PM: ❯ Config file
5:20:48 PM: /opt/build/repo/netlify.toml
5:20:48 PM: ​
5:20:48 PM: ❯ Context
5:20:48 PM: production
5:20:48 PM: ​
5:20:48 PM: ┌────────────────────────────────────┐
5:20:48 PM: │ 1. build.command from netlify.toml │
5:20:48 PM: └────────────────────────────────────┘
5:20:48 PM: ​
5:20:48 PM: $ hugo
5:20:48 PM: Start building sites …
5:20:49 PM: Total in 711 ms
5:20:49 PM: Error: Error building site: failed to render pages: render of “home” failed: execute of template failed: template: index.html:21:5: executing “main” at <partial “widget_page.html” .>: error calling partial: execute of template failed: template: partials/widget_page.html:103:9: executing “partials/widget_page.html” at <partial $widget_path $widget_args>: error calling partial: “/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-modules/wowchemy@v0.0.0-20201016182837-be0fa17ac006/layouts/partials/widgets/experience.html:40:23”: execute of template failed: template: partials/widgets/experience.html:40:23: executing “partials/widgets/experience.html” at <.date_start>: can’t evaluate field Format in type errors.errorString​
5:20:49 PM: ┌─────────────────────────────┐
5:20:49 PM: │ “build.command” failed │
5:20:49 PM: └─────────────────────────────┘
5:20:49 PM: ​
5:20:49 PM: Error message
5:20:49 PM: Command failed with exit code 255: hugo
5:20:49 PM: ​
5:20:49 PM: Error location
5:20:49 PM: In build.command from netlify.toml:
5:20:49 PM: hugo
5:20:49 PM: ​
5:20:49 PM: Resolved config
5:20:49 PM: build:
5:20:49 PM: command: hugo
5:20:49 PM: commandOrigin: config
5:20:49 PM: environment:
5:20:49 PM: - HUGO_VERSION
5:20:49 PM: - HUGO_ENABLEGITINFO
5:20:49 PM: - HUGO_ENV
5:20:49 PM: publish: /opt/build/repo/public
5:20:49 PM: headers:
5:20:49 PM: - for: '
.webmanifest’
5:20:49 PM: values:
5:20:49 PM: Content-Type: application/manifest+json; charset=UTF-8
5:20:49 PM: - for: index.xml
5:20:49 PM: values:
5:20:49 PM: Content-Type: application/rss+xml
5:20:49 PM: Caching artifacts
5:20:49 PM: Started saving build plugins
5:20:49 PM: Finished saving build plugins
5:20:49 PM: Started saving pip cache
5:20:49 PM: Finished saving pip cache
5:20:49 PM: Started saving emacs cask dependencies
5:20:49 PM: Finished saving emacs cask dependencies
5:20:49 PM: Started saving maven dependencies
5:20:49 PM: Finished saving maven dependencies
5:20:49 PM: Started saving boot dependencies
5:20:49 PM: Finished saving boot dependencies
5:20:49 PM: Started saving go dependencies
5:20:49 PM: Finished saving go dependencies
5:20:49 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
5:20:49 PM: Failing build: Failed to build site
5:20:49 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
5:20:49 PM: Finished processing build request in 16.480974703s

Well, Hugo is mentioning where exactly the error is, maybe you try checking that file? From what I understood, the code is trying to format a date, but, didn’t get a correct date object to format, maybe, there’s a missing date somewhere or the code itself is wrong.

It’s likely that your partial is missing a context to display the data. Here’s some links that might help:

One of the most common mistakes with new Hugo users is failing to pass a context to the partial call. In the pattern above, note how “the dot” ( . ) is required as the second argument to give the partial context. You can read more about “the dot” in the Hugo templating introduction.