hugo-toha / hugo-toha.github.io

An example hugo static site with Toha theme.
https://hugo-toha.github.io
MIT License
111 stars 576 forks source link

deployment failed in netlify #102

Closed Ashwath-Shetty closed 2 years ago

Ashwath-Shetty commented 3 years ago

10:14:54 AM: Build ready to start 10:14:56 AM: build-image version: fa439ad1ab9393b2c0d449d8d7c033927683f4b0 10:14:56 AM: build-image tag: v4.3.0 10:14:56 AM: buildbot version: d2795bf5a96b85e585e90944f15f15381ce164a7 10:14:56 AM: Fetching cached dependencies 10:14:56 AM: Failed to fetch cache, continuing with build 10:14:56 AM: Starting to prepare the repo for build 10:14:56 AM: No cached dependencies found. Cloning fresh repo 10:14:56 AM: git clone https://github.com/Ashwath-Shetty/toha_source 10:14:58 AM: Preparing Git Reference refs/heads/main 10:14:59 AM: Parsing package.json dependencies 10:15:00 AM: Starting build script 10:15:00 AM: Installing dependencies 10:15:00 AM: Python version set to 2.7 10:15:01 AM: Downloading and installing node v16.8.0... 10:15:01 AM: Downloading https://nodejs.org/dist/v16.8.0/node-v16.8.0-linux-x64.tar.xz... 10:15:01 AM: Computing checksum with sha256sum 10:15:01 AM: Checksums matched! 10:15:05 AM: Now using node v16.8.0 (npm v7.21.0) 10:15:05 AM: Started restoring cached build plugins 10:15:05 AM: Finished restoring cached build plugins 10:15:05 AM: Attempting ruby version 2.7.2, read from environment 10:15:06 AM: Using ruby version 2.7.2 10:15:07 AM: Using PHP version 8.0 10:15:07 AM: Installing Hugo 0.87.0 10:15:08 AM: hugo v0.87.0-B0C541E4+extended linux/amd64 BuildDate=2021-08-03T10:57:28Z VendorInfo=gohugoio 10:15:08 AM: Started restoring cached go cache 10:15:08 AM: Finished restoring cached go cache 10:15:08 AM: go version go1.16.5 linux/amd64 10:15:08 AM: go version go1.16.5 linux/amd64 10:15:08 AM: Installing missing commands 10:15:08 AM: Verify run directory 10:15:09 AM: ​ 10:15:09 AM: ──────────────────────────────────────────────────────────────── 10:15:09 AM: Netlify Build 10:15:09 AM: ──────────────────────────────────────────────────────────────── 10:15:09 AM: ​ 10:15:09 AM: ❯ Version 10:15:09 AM: @netlify/build 18.5.0 10:15:09 AM: ​ 10:15:09 AM: ❯ Flags 10:15:09 AM: baseRelDir: true 10:15:09 AM: buildId: 61271c4682d9c500088aab6a 10:15:09 AM: deployId: 61271c4682d9c500088aab6c 10:15:09 AM: ​ 10:15:09 AM: ❯ Current directory 10:15:09 AM: /opt/build/repo 10:15:09 AM: ​ 10:15:09 AM: ❯ Config file 10:15:09 AM: /opt/build/repo/netlify.toml 10:15:09 AM: ​ 10:15:09 AM: ❯ Context 10:15:09 AM: production 10:15:09 AM: ​ 10:15:09 AM: ──────────────────────────────────────────────────────────────── 10:15:09 AM: 1. build.command from netlify.toml 10:15:09 AM: ──────────────────────────────────────────────────────────────── 10:15:09 AM: ​ 10:15:09 AM: $ hugo --gc --minify 10:15:09 AM: Start building sites … 10:15:09 AM: hugo v0.87.0-B0C541E4+extended linux/amd64 BuildDate=2021-08-03T10:57:28Z VendorInfo=gohugoio 10:15:09 AM: ERROR 2021/08/26 04:45:09 render of "page" failed: execute of template failed: template: notes/single.html:6:8: executing "notes/single.html" at <partial "header.html" .>: error calling partial: "/opt/build/repo/themes/toha/layouts/partials/header.html:23:33": execute of template failed: template: partials/header.html:23:33: executing "partials/header.html" at <$favicon.MediaType.SubType>: nil pointer evaluating resource.Resource.MediaType 10:15:09 AM: ERROR 2021/08/26 04:45:09 render of "page" failed: execute of template failed: template: notes/single.html:6:8: executing "notes/single.html" at <partial "header.html" .>: error calling partial: "/opt/build/repo/themes/toha/layouts/partials/header.html:23:33": execute of template failed: template: partials/header.html:23:33: executing "partials/header.html" at <$favicon.MediaType.SubType>: nil pointer evaluating resource.Resource.MediaType 10:15:09 AM: ERROR 2021/08/26 04:45:09 render of "page" failed: execute of template failed: template: notes/single.html:6:8: executing "notes/single.html" at <partial "header.html" .>: error calling partial: "/opt/build/repo/themes/toha/layouts/partials/header.html:23:33": execute of template failed: template: partials/header.html:23:33: executing "partials/header.html" at <$favicon.MediaType.SubType>: nil pointer evaluating resource.Resource.MediaType 10:15:09 AM: ERROR 2021/08/26 04:45:09 render of "page" failed: execute of template failed: template: notes/single.html:6:8: executing "notes/single.html" at <partial "header.html" .>: error calling partial: "/opt/build/repo/themes/toha/layouts/partials/header.html:23:33": execute of template failed: template: partials/header.html:23:33: executing "partials/header.html" at <$favicon.MediaType.SubType>: nil pointer evaluating resource.Resource.MediaType 10:15:09 AM: Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: notes/single.html:6:8: executing "notes/single.html" at <partial "header.html" .>: error calling partial: "/opt/build/repo/themes/toha/layouts/partials/header.html:23:33": execute of template failed: template: partials/header.html:23:33: executing "partials/header.html" at <$favicon.MediaType.SubType>: nil pointer evaluating resource.Resource.MediaType 10:15:09 AM: Total in 126 ms 10:15:09 AM: ​ 10:15:09 AM: ──────────────────────────────────────────────────────────────── 10:15:09 AM: "build.command" failed 10:15:09 AM: ──────────────────────────────────────────────────────────────── 10:15:09 AM: ​ 10:15:09 AM: Error message 10:15:09 AM: Command failed with exit code 255: hugo --gc --minify 10:15:09 AM: ​ 10:15:09 AM: Error location 10:15:09 AM: In build.command from netlify.toml: 10:15:09 AM: hugo --gc --minify 10:15:09 AM: ​ 10:15:09 AM: Resolved config 10:15:09 AM: build: 10:15:09 AM: command: hugo --gc --minify 10:15:09 AM: commandOrigin: config 10:15:09 AM: environment: 10:15:09 AM: - HUGO_ENABLEGITINFO 10:15:09 AM: - HUGO_ENV 10:15:09 AM: - HUGO_THEME 10:15:09 AM: - HUGO_VERSION 10:15:09 AM: publish: /opt/build/repo/public 10:15:09 AM: publishOrigin: config 10:15:10 AM: Caching artifacts 10:15:10 AM: Started saving build plugins 10:15:10 AM: Finished saving build plugins 10:15:10 AM: Started saving pip cache 10:15:10 AM: Finished saving pip cache 10:15:10 AM: Started saving emacs cask dependencies 10:15:10 AM: Finished saving emacs cask dependencies 10:15:10 AM: Started saving maven dependencies 10:15:10 AM: Finished saving maven dependencies 10:15:10 AM: Started saving boot dependencies 10:15:10 AM: Finished saving boot dependencies 10:15:10 AM: Started saving rust rustup cache 10:15:10 AM: Finished saving rust rustup cache 10:15:10 AM: Started saving go dependencies 10:15:10 AM: Finished saving go dependencies 10:15:13 AM: Build failed due to a user error: Build script returned non-zero exit code: 2 10:15:13 AM: Creating deploy upload records 10:15:13 AM: Failing build: Failed to build site 10:15:13 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 10:15:13 AM: Finished processing build request in 17.053034415s

i tried to deploy my portfolio with your theme but I got the above error when I deploy it in netlify. it works fine in localhost though, I'm not sure where to contact you for help, can you please have a look at it and help me fix it, I really liked your template and I want this to work badly to see my portfolio in this template. here is my repo link https://github.com/Ashwath-Shetty/toha_source here you go for cleaner representation of deploy log https://answers.netlify.com/t/deployment-failed-for-a-hugo-theme/43111

hossainemruz commented 3 years ago

This author image does not exist in your repo. https://github.com/Ashwath-Shetty/toha_source/blob/a190affe97da07d7527e040d7d0103c27937dc88/data/en/author.yaml#L6

jessdejesus commented 2 years ago

Hello! I had exactly the same error, so I added my image "jess.jpg" into ./assets/images/author/jess.jpg, but I am still getting the following error: 11:35:05 PM: $ hugo --gc --minify 11:35:05 PM: Start building sites … 11:35:05 PM: hugo v0.100.2-d25cb2943fd94ecf781412aeff9682d5dc62e284+extended linux/amd64 BuildDate=2022-06-08T10:25:57Z VendorInfo=gohugoio 11:35:05 PM: ERROR 2022/06/14 21:35:05 render of "home" failed: "/opt/build/repo/themes/toha/layouts/index.html:41:8": execute of template failed: template: index.html:41:8: executing "index.html" at <partial "sections/home.html" .>: error calling partial: "/opt/build/repo/themes/toha/layouts/partials/sections/home.html:111:29": execute of template failed: template: partials/sections/home.html:111:29: executing "partials/sections/home.html" at <$authorImage.RelPermalink>: nil pointer evaluating resource.Resource.RelPermalink 11:35:05 PM: Error: Error building site: failed to render pages: render of "page" failed: "/opt/build/repo/themes/toha/layouts/_default/single.html:49:46": execute of template failed: template: _default/single.html:49:46: executing "content" at <partial "helpers/get-author-image.html" .>: error calling partial: "/opt/build/repo/themes/toha/layouts/partials/helpers/get-author-image.html:29:22": execute of template failed: template: partials/helpers/get-author-image.html:29:22: executing "partials/helpers/get-author-image.html" at <$authorImage.RelPermalink>: nil pointer evaluating resource.Resource.RelPermalink 11:35:05 PM: Total in 195 ms

In case it helps, here is my repo: https://github.com/jessdejesus/jessdejesus.github.io.git

Please let me know if you have an idea, your template is gorgeous and I would love to use it! Thanks for publishing it!

hossainemruz commented 2 years ago

@jessdejesus change ./assets/images/author/jess.jpg to images/author/jess.jpg here.

jessdejesus commented 2 years ago

Thank you so so much! It works now :)

gowrapavan commented 4 months ago

author image does not exist in your repo 4:48:57 PM: ERROR render of "page" failed: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.4.1-0.20240510202123-a959cb174de6/layouts/notes/single.html:7:8": execute of template failed: template: notes/single.html:7:8: executing "sidebar" at : can't evaluate field IsMultilingual in type interface {} ERROR render of "page" failed: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.4.1-0.20240510202123-a959cb174de6/layouts/_default/search.html:7:8": execute of template failed: template: _default/search.html:7:8: executing "sidebar" at : can't evaluate field IsMultilingual in type interface {} ERROR render of "page" failed: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.4.1-0.20240510202123-a959cb174de6/layouts/_default/single.html:6:7": execute of template failed: template: _default/single.html:6:7: executing "navbar" at <partial "navigators/navbar.html" .>: error calling partial: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.4.1-0.20240510202123-a959cb174de6/layouts/partials/navigators/navbar.html:140:13": execute of template failed: template: partials/navigators/navbar.html:140:13: executing "partials/navigators/navbar.html" at <partial "navigators/lang-selector.html" .>: error calling partial: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.4.1-0.20240510202123-a959cb174de6/layouts/partials/navigators/lang-selector.html:2:6": execute of template failed: template: partials/navigators/lang-selector.html:2:6: executing "partials/navigators/lang-selector.html" at : can't evaluate field IsMultilingual in type interface {} Total in 2351 ms 4:48:57 PM: Error: error building site: render: failed to render pages: render of "page" failed: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.4.1-0.20240510202123-a959cb174de6/layouts/notes/single.html:2:7": execute of template failed: template: notes/single.html:2:7: executing "navbar" at <partial "navigators/navbar.html" .>: error calling partial: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.4.1-0.20240510202123-a959cb174de6/layouts/partials/navigators/navbar.html:140:13": execute of template failed: template: partials/navigators/navbar.html:140:13: executing "partials/navigators/navbar.html" at <partial "navigators/lang-selector.html" .>: error calling partial: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.4.1-0.20240510202123-a959cb174de6/layouts/partials/navigators/lang-selector.html:2:6": execute of template failed: template: partials/navigators/lang-selector.html:2:6: executing "partials/navigators/lang-selector.html" at : can't evaluate field IsMultilingual in type interface {} ​ 4:48:57 PM: "build.command" failed
4:48:57 PM: ──────────────────────────────────────────────────────────────── 4:48:57 PM: ​ 4:48:57 PM: Error message 4:48:57 PM: Command failed with exit code 1: hugo --gc --minify 4:48:57 PM: ​ 4:48:57 PM: Error location 4:48:57 PM: In build.command from netlify.toml: 4:48:57 PM: hugo --gc --minify 4:48:57 PM: ​ 4:48:57 PM: Resolved config 4:48:57 PM: build: 4:48:57 PM: command: hugo --gc --minify 4:48:57 PM: commandOrigin: config 4:48:57 PM: environment: 4:48:57 PM: - HUGO_ENABLEGITINFO 4:48:57 PM: - HUGO_ENV 4:48:57 PM: - HUGO_VERSION 4:48:57 PM: - NODE_VERSION 4:48:57 PM: - NPM_VERSION 4:48:57 PM: publish: /opt/build/repo/public 4:48:57 PM: publishOrigin: config 4:48:58 PM: Build failed due to a user error: Build script returned non-zero exit code: 2 4:48:58 PM: Failing build: Failed to build site 4:48:58 PM: Finished processing build request in 23.308s

I'm facing same issue but i checked weather the author image is there or not ,it was there ,please give your assist and your template is gorgeous and I would love to use it! Thanks for publishing it!

my repo

gowrapavan commented 4 months ago

author image does not exist in your repo 4:48:57 PM: ERROR render of "page" failed: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.4.1-0.20240510202123-a959cb174de6/layouts/notes/single.html:7:8": execute of template failed: template: notes/single.html:7:8: executing "sidebar" at : can't evaluate field IsMultilingual in type interface {} ERROR render of "page" failed: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.4.1-0.20240510202123-a959cb174de6/layouts/_default/search.html:7:8": execute of template failed: template: _default/search.html:7:8: executing "sidebar" at : can't evaluate field IsMultilingual in type interface {} ERROR render of "page" failed: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.4.1-0.20240510202123-a959cb174de6/layouts/_default/single.html:6:7": execute of template failed: template: _default/single.html:6:7: executing "navbar" at <partial "navigators/navbar.html" .>: error calling partial: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.4.1-0.20240510202123-a959cb174de6/layouts/partials/navigators/navbar.html:140:13": execute of template failed: template: partials/navigators/navbar.html:140:13: executing "partials/navigators/navbar.html" at <partial "navigators/lang-selector.html" .>: error calling partial: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.4.1-0.20240510202123-a959cb174de6/layouts/partials/navigators/lang-selector.html:2:6": execute of template failed: template: partials/navigators/lang-selector.html:2:6: executing "partials/navigators/lang-selector.html" at : can't evaluate field IsMultilingual in type interface {} Total in 2351 ms 4:48:57 PM: Error: error building site: render: failed to render pages: render of "page" failed: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.4.1-0.20240510202123-a959cb174de6/layouts/notes/single.html:2:7": execute of template failed: template: notes/single.html:2:7: executing "navbar" at <partial "navigators/navbar.html" .>: error calling partial: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.4.1-0.20240510202123-a959cb174de6/layouts/partials/navigators/navbar.html:140:13": execute of template failed: template: partials/navigators/navbar.html:140:13: executing "partials/navigators/navbar.html" at <partial "navigators/lang-selector.html" .>: error calling partial: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.4.1-0.20240510202123-a959cb174de6/layouts/partials/navigators/lang-selector.html:2:6": execute of template failed: template: partials/navigators/lang-selector.html:2:6: executing "partials/navigators/lang-selector.html" at : can't evaluate field IsMultilingual in type interface {} ​ 4:48:57 PM: "build.command" failed 4:48:57 PM: ──────────────────────────────────────────────────────────────── 4:48:57 PM: ​ 4:48:57 PM: Error message 4:48:57 PM: Command failed with exit code 1: hugo --gc --minify 4:48:57 PM: ​ 4:48:57 PM: Error location 4:48:57 PM: In build.command from netlify.toml: 4:48:57 PM: hugo --gc --minify 4:48:57 PM: ​ 4:48:57 PM: Resolved config 4:48:57 PM: build: 4:48:57 PM: command: hugo --gc --minify 4:48:57 PM: commandOrigin: config 4:48:57 PM: environment: 4:48:57 PM: - HUGO_ENABLEGITINFO 4:48:57 PM: - HUGO_ENV 4:48:57 PM: - HUGO_VERSION 4:48:57 PM: - NODE_VERSION 4:48:57 PM: - NPM_VERSION 4:48:57 PM: publish: /opt/build/repo/public 4:48:57 PM: publishOrigin: config 4:48:58 PM: Build failed due to a user error: Build script returned non-zero exit code: 2 4:48:58 PM: Failing build: Failed to build site 4:48:58 PM: Finished processing build request in 23.308s

I'm facing same issue but i checked weather the author image is there or not ,it was there ,please give your assist and your template is gorgeous and I would love to use it! Thanks for publishing it!

my repo

Thanks to your template, I was able to overcome the issue by adjusting the versions of Hugo, Node, and NPM in netlify.toml accordingly within my local repository. This adjustment allowed everything to work smoothly.