Hi,
my site is not ready yet, but I want to deploy the site to ask another question. But I get errors, if try to deploy on Netlify.
Here is my repo:
https://github.com/malde11/portfolio/tree/main
And this is the error i get:
5:43:35 PM: build-image version: 3d3c7e8b4321e2c1a54a2c4584fb46ba742b1630 (focal)
5:43:35 PM: buildbot version: 3d3c7e8b4321e2c1a54a2c4584fb46ba742b1630
5:43:36 PM: Fetching cached dependencies
5:43:36 PM: Failed to fetch cache, continuing with build
5:43:36 PM: Starting to prepare the repo for build
5:43:36 PM: No cached dependencies found. Cloning fresh repo
5:43:36 PM: git clone --filter=blob:none https://github.com/malde11/portfolio
5:43:36 PM: Preparing Git Reference refs/heads/main
5:43:39 PM: Starting to install dependencies
5:43:39 PM: Python version set to 3.8
5:43:40 PM: Attempting Ruby version 2.7.2, read from environment
5:43:41 PM: Using Ruby version 2.7.2
5:43:42 PM: Started restoring cached go cache
5:43:42 PM: Finished restoring cached go cache
5:43:42 PM: go version go1.19.13 linux/amd64
5:43:43 PM: Using PHP version 8.0
5:43:43 PM: Installing Hugo 0.125.2
5:43:44 PM: hugo v0.125.2-4e483f5d4abae136c4312d397a55e9e1d39148df+extended linux/amd64 BuildDate=2024-04-20T15:29:44Z VendorInfo=gohugoio
5:43:46 PM: v18.20.2 is already installed.
5:43:46 PM: Now using node v18.20.2 (npm v10.5.0)
5:43:46 PM: Enabling Node.js Corepack
5:43:46 PM: Started restoring cached build plugins
5:43:46 PM: Finished restoring cached build plugins
5:43:47 PM: Successfully installed dependencies
5:43:47 PM: Starting build script
5:43:48 PM: Detected 1 framework(s)
5:43:48 PM: "hugo" at version "unknown"
5:43:48 PM: Section completed: initializing
5:43:50 PM:
5:43:50 PM: Netlify Build
5:43:50 PM: ────────────────────────────────────────────────────────────────
5:43:50 PM:
5:43:50 PM: ❯ Version
5:43:50 PM: @netlify/build 29.39.2
5:43:50 PM:
5:43:50 PM: ❯ Flags
5:43:50 PM: baseRelDir: true
5:43:50 PM: buildId: 66268597af8a9b0c47cd9b24
5:43:50 PM: deployId: 66268597af8a9b0c47cd9b26
5:43:50 PM:
5:43:50 PM: ❯ Current directory
5:43:50 PM: /opt/build/repo
5:43:50 PM:
5:43:50 PM: ❯ Config file
5:43:50 PM: No config file was defined: using default values.
5:43:50 PM:
5:43:50 PM: ❯ Context
5:43:50 PM: production
5:43:50 PM:
5:43:50 PM: Build command from Netlify app
5:43:50 PM: ────────────────────────────────────────────────────────────────
5:43:50 PM:
5:43:50 PM: $ hugo
5:43:50 PM: Start building sites …
5:43:50 PM: hugo v0.125.2-4e483f5d4abae136c4312d397a55e9e1d39148df+extended linux/amd64 BuildDate=2024-04-20T15:29:44Z VendorInfo=gohugoio
5:43:50 PM: ERROR render of "page" failed: "/opt/build/repo/layouts/_default/baseof.html:5:12": execute of template failed: template: portfolio/single.html:5:12: executing "portfolio/single.html" at <partial "header.html" .>: error calling partial: "/opt/build/repo/layouts/partials/header.html:21:19": execute of template failed: template: partials/header.html:21:19: executing "partials/header.html" at <len $menu>: error calling len: reflect: call of reflect.Value.Type on zero Value
5:43:50 PM: ERROR render of "home" failed: "/opt/build/repo/layouts/_default/baseof.html:5:12": execute of template failed: template: index.html:5:12: executing "index.html" at <partial "header.html" .>: error calling partial: "/opt/build/repo/layouts/partials/header.html:21:19": execute of template failed: template: partials/header.html:21:19: executing "partials/header.html" at <len $menu>: error calling len: reflect: call of reflect.Value.Type on zero Value
5:43:50 PM: Total in 41 ms
5:43:50 PM: Error: error building site: render: failed to render pages: render of "taxonomy" failed: "/opt/build/repo/layouts/_default/baseof.html:5:12": execute of template failed: template: _default/list.html:5:12: executing "_default/list.html" at <partial "header.html" .>: error calling partial: "/opt/build/repo/layouts/partials/header.html:21:19": execute of template failed: template: partials/header.html:21:19: executing "partials/header.html" at <len $menu>: error calling len: reflect: call of reflect.Value.Type on zero Value
5:43:50 PM:
5:43:50 PM: "build.command" failed
5:43:50 PM: ────────────────────────────────────────────────────────────────
5:43:50 PM:
5:43:50 PM: Error message
5:43:50 PM: Command failed with exit code 1: hugo (https://ntl.fyi/exit-code-1)
5:43:50 PM:
5:43:50 PM: Error location
5:43:50 PM: In Build command from Netlify app:
5:43:50 PM: hugo
5:43:50 PM:
5:43:50 PM: Resolved config
5:43:50 PM: build:
5:43:50 PM: command: hugo
5:43:50 PM: commandOrigin: ui
5:43:50 PM: environment:
5:43:50 PM: - HUGO_VERSION
5:43:50 PM: publish: /opt/build/repo/public
5:43:50 PM: publishOrigin: ui
5:43:51 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
5:43:51 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
5:43:51 PM: Failing build: Failed to build site
5:43:51 PM: Finished processing build request in 15.589s
I am new to hugo, hope someone can help me.