boratanrikulu / eternity

A minimalist Hugo theme designed for portfolio sites.
https://eternity.bora.sh
MIT License
237 stars 78 forks source link

netlify and vercel building error #25

Closed Hearty0 closed 1 year ago

Hearty0 commented 1 year ago

i tried to deploy the hugo website with eternity theme. used this commands to install theme: $ hugo new site hearty $ cd hearty $ rm config.toml $ git init $ git submodule add --depth=1 https://github.com/boratanrikulu/eternity.git themes/eternity $ cp -r ./themes/eternity/example/eternity.bora.sh/* .

it is working when i starting local server with the command $ hugo serve --port 1313. but when i'm trying to host it( i tried netlify and vercel ) it shows me the same error. check log with the error a little bit down

6:57:58 PM: build-image version: a2d22d22e4555d1ef0a972ed14a0a4b366ad20c4 (focal)
6:57:58 PM: build-image tag: v4.16.3
6:57:58 PM: buildbot version: e2f63efe7f752311197ae3394a83cb4531d1cbd2
6:57:58 PM: Fetching cached dependencies
6:57:58 PM: Failed to fetch cache, continuing with build
6:57:58 PM: Starting to prepare the repo for build
6:57:59 PM: No cached dependencies found. Cloning fresh repo
6:57:59 PM: git clone --filter=blob:none --no-checkout https://github.com/Hearty0/hearty
6:57:59 PM: Preparing Git Reference refs/heads/main
6:58:00 PM: Parsing package.json dependencies
6:58:01 PM: Starting build script
6:58:01 PM: Installing dependencies
6:58:01 PM: Python version set to 2.7
6:58:01 PM: v16.19.0 is already installed.
6:58:02 PM: Now using node v16.19.0 (npm v8.19.3)
6:58:02 PM: Enabling Node.js Corepack
6:58:02 PM: Started restoring cached build plugins
6:58:02 PM: Finished restoring cached build plugins
6:58:02 PM: Attempting Ruby version 2.7.2, read from environment
6:58:03 PM: Using Ruby version 2.7.2
6:58:03 PM: Using PHP version 8.0
6:58:03 PM: Started restoring cached go cache
6:58:03 PM: Finished restoring cached go cache
6:58:04 PM: Installing Go version 1.19.5 (requested 1.19.x)
6:58:09 PM: unset GOOS;
6:58:09 PM: unset GOARCH;
6:58:09 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.19.5.linux.amd64';
6:58:09 PM: export PATH="/opt/buildhome/.gimme/versions/go1.19.5.linux.amd64/bin:${PATH}";
6:58:09 PM: go version >&2;
6:58:09 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.19.5.linux.amd64.env"
6:58:09 PM: go version go1.19.5 linux/amd64
6:58:09 PM: Detected 1 framework(s)
6:58:09 PM: "hugo" at version "unknown"
6:58:09 PM: Installing missing commands
6:58:09 PM: Verify run directory
6:58:09 PM: Section completed: initializing
6:58:11 PM: ​
6:58:11 PM:   Netlify Build                                                 
6:58:11 PM: ────────────────────────────────────────────────────────────────
6:58:11 PM: ​
6:58:11 PM: ❯ Version
6:58:11 PM:   @netlify/build 29.5.1
6:58:11 PM: ​
6:58:11 PM: ❯ Flags
6:58:11 PM:   baseRelDir: true
6:58:11 PM:   buildId: 63c984a396402a6bed195824
6:58:11 PM:   deployId: 63c984a396402a6bed195826
6:58:11 PM: ​
6:58:11 PM: ❯ Current directory
6:58:11 PM:   /opt/build/repo
6:58:11 PM: ​
6:58:11 PM: ❯ Config file
6:58:11 PM:   No config file was defined: using default values.
6:58:11 PM: ​
6:58:11 PM: ❯ Context
6:58:11 PM:   production
6:58:11 PM: ​
6:58:11 PM:   1. Build command from Netlify app                             
6:58:11 PM: ────────────────────────────────────────────────────────────────
6:58:11 PM: ​
6:58:11 PM: $ hugo
6:58:11 PM: Start building sites …
6:58:11 PM: hugo v0.85.0-724D5DB5+extended linux/amd64 BuildDate=2021-07-05T10:46:28Z VendorInfo=gohugoio
6:58:11 PM: ERROR 2023/01/19 17:58:11 render of "page" failed: execute of template failed: template: _default/single.html:1:3: executing "_default/single.html" at <partial "header.html" .>: error calling partial: execute of template failed: template: partials/header.html:14:4: executing "partials/header.html" at <partial "meta" .>: error calling partial: execute of template failed: template: partials/meta.html:24:7: executing "partials/meta.html" at <partial "helpers/get" (dict "scratch" $scratch "row" .Params)>: error calling partial: "/opt/build/repo/themes/eternity/layouts/partials/helpers/get.html:19:28": execute of template failed: template: partials/helpers/get.html:19:28: executing "partials/helpers/get.html" at <resources>: can't evaluate field GetRemote in type interface {}ERROR 2023/01/19 17:58:11 render of "page" failed: execute of template failed: template: _default/single.html:1:3: executing "_default/single.html" at <partial "header.html" .>: error calling partial: execute of template failed: template: partials/header.html:14:4: executing "partials/header.html" at <partial "meta" .>: error calling partial: execute of template failed: template: partials/meta.html:24:7: executing "partials/meta.html" at <partial "helpers/get" (dict "scratch" $scratch "row" .Params)>: error calling partial: "/opt/build/repo/themes/eternity/layouts/partials/helpers/get.html:19:28": execute of template failed: template: partials/helpers/get.html:19:28: executing "partials/helpers/get.html" at <resources>: can't evaluate field GetRemote in type interface {}ERROR 2023/01/19 17:58:11 render of "page" failed: execute of template failed: template: _default/single.html:1:3: executing "_default/single.html" at <partial "header.html" .>: error calling partial: execute of template failed: template: partials/header.html:14:4: executing "partials/header.html" at <partial "meta" .>: error calling partial: execute of template failed: template: partials/meta.html:24:7: executing "partials/meta.html" at <partial "helpers/get" (dict "scratch" $scratch "row" .Params)>: error calling partial: "/opt/build/repo/themes/eternity/layouts/partials/helpers/get.html:19:28": execute of template failed: template: partials/helpers/get.html:19:28: executing "partials/helpers/get.html" at <resources>: can't evaluate field GetRemote in type interface {}ERROR 2023/01/19 17:58:11 render of "page" failed: execute of template failed: template: _default/single.html:1:3: executing "_default/single.html" at <partial "header.html" .>: error calling partial: execute of template failed: template: partials/header.html:14:4: executing "partials/header.html" at <partial "meta" .>: error calling partial: execute of template failed: template: partials/meta.html:24:7: executing "partials/meta.html" at <partial "helpers/get" (dict "scratch" $scratch "row" .Params)>: error calling partial: "/opt/build/repo/themes/eternity/layouts/partials/helpers/get.html:19:28": execute of template failed: template: partials/helpers/get.html:19:28: executing "partials/helpers/get.html" at <resources>: can't evaluate field GetRemote in type interface {}Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:1:3: executing "_default/single.html" at <partial "header.html" .>: error calling partial: execute of template failed: template: partials/header.html:14:4: executing "partials/header.html" at <partial "meta" .>: error calling partial: execute of template failed: template: partials/meta.html:24:7: executing "partials/meta.html" at <partial "helpers/get" (dict "scratch" $scratch "row" .Params)>: error calling partial: "/opt/build/repo/themes/eternity/layouts/partials/helpers/get.html:19:28": execute of template failed: template: partials/helpers/get.html:19:28: executing "partials/helpers/get.html" at <resources>: can't evaluate field GetRemote in type interface {}Total in 573 ms
6:58:11 PM: ​
6:58:11 PM:   "build.command" failed                                        
6:58:11 PM: ────────────────────────────────────────────────────────────────
6:58:11 PM: ​
6:58:11 PM:   Error message
6:58:11 PM:   Command failed with exit code 255: hugo (https://ntl.fyi/exit-code-255)
6:58:11 PM: ​
6:58:11 PM:   Error location
6:58:11 PM:   In Build command from Netlify app:
6:58:11 PM:   hugo
6:58:11 PM: ​
6:58:11 PM:   Resolved config
6:58:11 PM:   build:
6:58:11 PM:     command: hugo
6:58:11 PM:     commandOrigin: ui
6:58:11 PM:     publish: /opt/build/repo/public
6:58:12 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
6:58:11 PM:     publishOrigin: ui
6:58:12 PM: Caching artifacts
6:58:12 PM: Started saving build plugins
6:58:12 PM: Finished saving build plugins
6:58:12 PM: Started saving pip cache
6:58:12 PM: Finished saving pip cache
6:58:12 PM: Started saving emacs cask dependencies
6:58:12 PM: Finished saving emacs cask dependencies
6:58:12 PM: Started saving maven dependencies
6:58:12 PM: Finished saving maven dependencies
6:58:12 PM: Started saving boot dependencies
6:58:12 PM: Finished saving boot dependencies
6:58:12 PM: Started saving rust rustup cache
6:58:12 PM: Finished saving rust rustup cache
6:58:12 PM: Started saving go dependencies
6:58:12 PM: Finished saving go dependencies
6:58:12 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
6:58:12 PM: Failing build: Failed to build site
6:58:13 PM: Finished processing build request in 14.350431905s

P.S. your site is awesome. good luck!

boratanrikulu commented 1 year ago

Hi @Hearty0!

Seems the version is a bit old, hugo v0.85.0
Please, re-try with this version (at least); https://github.com/boratanrikulu/eternity/blob/main/theme.toml#L9

Hearty0 commented 1 year ago

@boratanrikulu The change of version totally helped! sorry for my inattention, i am very grateful for your help. i wish you all the best! and thank you for such a beautiful theme!