CaiJimmy / hugo-theme-stack

Card-style Hugo theme designed for bloggers
https://stack.jimmycai.com
GNU General Public License v3.0
4.89k stars 1.6k forks source link

Issue when deploying sites #848

Closed mgt-lya closed 1 year ago

mgt-lya commented 1 year ago

What happened?

Hi I'm a beginner to use Hugo academic. Yesterday I upload my gallery and then it told me somewhere gets wrong. I tried to fix the bug and searched for a day but still cannot find out what happened. It just throw me a long text and I don't know what I can do now

Hugo version

0.111.3

Theme version

academic? I'm not sure

What browsers are you seeing the problem on?

Firefox

More information about the browser

No response

Relevant log output

11:37:46 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
11:37:26 AM: build-image version: ad28fb91fae632ef7f2e4d659a892d68ee2681a6 (focal)
11:37:26 AM: buildbot version: 751c8de2ba48c52549712392ca0244c53d39c3c1
11:37:26 AM: Building without cache
11:37:26 AM: Starting to prepare the repo for build
11:37:27 AM: No cached dependencies found. Cloning fresh repo
11:37:27 AM: git clone --filter=blob:none git@github.com:mgt-lya/lya-hugo-academic
11:37:27 AM: Preparing Git Reference refs/heads/main
11:37:30 AM: Starting to install dependencies
11:37:30 AM: Python version set to 3.8
11:37:30 AM: Attempting Ruby version 2.7.2, read from environment
11:37:30 AM: Using Ruby version 2.7.2
11:37:31 AM: Started restoring cached go cache
11:37:31 AM: Finished restoring cached go cache
11:37:31 AM: go version go1.19.11 linux/amd64
11:37:32 AM: Using PHP version 8.0
11:37:32 AM: Installing Hugo 0.111.3
11:37:33 AM: hugo v0.111.3-5d4eb5154e1fed125ca8e9b5a0315c4180dab192+extended linux/amd64 BuildDate=2023-03-12T11:40:50Z VendorInfo=gohugoio
11:37:34 AM: v18.17.0 is already installed.
11:37:34 AM: Now using node v18.17.0 (npm v9.6.7)
11:37:34 AM: Enabling Node.js Corepack
11:37:34 AM: Started restoring cached build plugins
11:37:34 AM: Finished restoring cached build plugins
11:37:35 AM: Install dependencies script success
11:37:35 AM: Starting build script
11:37:35 AM: Detected 0 framework(s)
11:37:35 AM: Section completed: initializing
11:37:37 AM: ​
11:37:37 AM: Netlify Build                                                 
11:37:37 AM: ────────────────────────────────────────────────────────────────
11:37:37 AM: ​
11:37:37 AM: ❯ Version
11:37:37 AM:   @netlify/build 29.17.1
11:37:37 AM: ​
11:37:37 AM: ❯ Flags
11:37:37 AM:   baseRelDir: true
11:37:37 AM:   buildId: 64bca075b5c9525c667631ef
11:37:37 AM:   deployId: 64bca075b5c9525c667631f1
11:37:37 AM: ​
11:37:37 AM: ❯ Current directory
11:37:37 AM:   /opt/build/repo
11:37:37 AM: ​
11:37:37 AM: ❯ Config file
11:37:37 AM:   /opt/build/repo/netlify.toml
11:37:37 AM: ​
11:37:37 AM: ❯ Context
11:37:37 AM:   production
11:37:37 AM: ​
11:37:37 AM: ❯ Installing plugins
11:37:37 AM:    - netlify-plugin-hugo-cache-resources@0.2.1
11:37:38 AM: ​
11:37:38 AM: ❯ Loading plugins
11:37:38 AM:    - netlify-plugin-hugo-cache-resources@0.2.1 from netlify.toml
11:37:39 AM: ​
11:37:39 AM: netlify-plugin-hugo-cache-resources (onPreBuild event)        
11:37:39 AM: ────────────────────────────────────────────────────────────────
11:37:39 AM: ​
11:37:39 AM: Checking if resources exist at resources
11:37:39 AM: No cache found for resources folder
11:37:39 AM: ​
11:37:39 AM: (netlify-plugin-hugo-cache-resources onPreBuild completed in 10ms)
11:37:39 AM: ​
11:37:39 AM: build.command from netlify.toml                               
11:37:39 AM: ────────────────────────────────────────────────────────────────
11:37:39 AM: ​
11:37:39 AM: $ hugo --gc --minify -b $URL
11:37:42 AM: hugo: downloading modules …
11:37:43 AM: hugo: collected modules in 3825 ms
11:37:43 AM: Start building sites …
11:37:43 AM: hugo v0.111.3-5d4eb5154e1fed125ca8e9b5a0315c4180dab192+extended linux/amd64 BuildDate=2023-03-12T11:40:50Z VendorInfo=gohugoio
11:37:44 AM: ERROR 2023/07/23 03:37:44 render of page failed: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/project/single.html:5:5: execute of template failed: template: project/single.html:5:5: executing main at <partial page_header.html .>: error calling partial: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/partials/page_header.html:70:5: execute of template failed: template: partials/page_header.html:70:5: executing partials/page_header.html at <partial page_links_div.html $page>: error calling partial: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/partials/page_links_div.html:10:5: execute of template failed: template: partials/page_links_div.html:10:5: executing partials/page_links_div.html at <partial page_links (dict page . is_list 0)>: error calling partial: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/partials/page_links.html:136:17: execute of template failed: template: partials/page_links.html:136:17: executing partials/page_links.html at <.icon_pack>: nil pointer evaluating interface {}.icon_pack
11:37:44 AM: ERROR 2023/07/23 03:37:44 render of section failed: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/_default/list.html:17:7: execute of template failed: template: _default/list.html:17:7: executing main at <partial functions/render_view (dict page $ item . view ($.Params.view | default compact) index $index)>: error calling partial: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/partials/functions/render_view.html:33:11: execute of template failed: template: partials/functions/render_view.html:33:11: executing partials/functions/render_view.html at <partial (printf views/%s $view_file) (dict page $page item $item index $index)>: error calling partial: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/partials/views/compact.html:71:9: execute of template failed: template: partials/views/compact.html:71:9: executing partials/views/compact.html at <partial page_links (dict page $item is_list 1)>: error calling partial: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/partials/page_links.html:136:17: execute of template failed: template: partials/page_links.html:136:17: executing partials/page_links.html at <.icon_pack>: nil pointer evaluating interface {}.icon_pack
11:37:44 AM: ERROR 2023/07/23 03:37:44 render of home failed: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/index.html:22:5: execute of template failed: template: index.html:22:5: executing main at <partial landing_page.html .>: error calling partial: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/partials/landing_page.html:7:5: execute of template failed: template: partials/landing_page.html:7:5: executing partials/landing_page.html at <partial functions/parse_block_v2 (dict page $ block $block)>: error calling partial: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/partials/functions/parse_block_v2.html:133:7: execute of template failed: template: partials/functions/parse_block_v2.html:133:7: executing partials/functions/parse_block_v2.html at <partial $block_path $widget_args>: error calling partial: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/partials/blocks/portfolio.html:102:11: execute of template failed: template: partials/blocks/portfolio.html:102:11: executing partials/blocks/portfolio.html at <partial functions/render_view (dict page $block item . view $view index $index)>: error calling partial: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/partials/functions/render_view.html:33:11: execute of template failed: template: partials/functions/render_view.html:33:11: executing partials/functions/render_view.html at <partial (printf views/%s $view_file) (dict page $page item $item index $index)>: error calling partial: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/partials/views/showcase.html:51:11: execute of template failed: template: partials/views/showcase.html:51:11: executing partials/views/showcase.html at <partial page_links (dict page $item is_list 0)>: error calling partial: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/partials/page_links.html:136:17: execute of template failed: template: partials/page_links.html:136:17: executing partials/page_links.html at <.icon_pack>: nil pointer evaluating interface {}.icon_pack
11:37:44 AM: Error: Error building site: failed to render pages: render of term failed: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/_default/list.html:17:7: execute of template failed: template: _default/list.html:17:7: executing main at <partial functions/render_view (dict page $ item . view ($.Params.view | default compact) index $index)>: error calling partial: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/partials/functions/render_view.html:33:11: execute of template failed: template: partials/functions/render_view.html:33:11: executing partials/functions/render_view.html at <partial (printf views/%s $view_file) (dict page $page item $item index $index)>: error calling partial: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/partials/views/compact.html:71:9: execute of template failed: template: partials/views/compact.html:71:9: executing partials/views/compact.html at <partial page_links (dict page $item is_list 1)>: error calling partial: /opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20230420205746-951c7b6f709d/layouts/partials/page_links.html:136:17: execute of template failed: template: partials/page_links.html:136:17: executing partials/page_links.html at <.icon_pack>: nil pointer evaluating interface {}.icon_pack
11:37:44 AM: Total in 4833 ms
11:37:44 AM: ​
11:37:44 AM: build.command failed                                        
11:37:44 AM: ────────────────────────────────────────────────────────────────
11:37:44 AM: ​
11:37:44 AM:   Error message
11:37:44 AM:   Command failed with exit code 255: hugo --gc --minify -b $URL (https://ntl.fyi/exit-code-255)
11:37:44 AM: ​
11:37:44 AM:   Error location
11:37:44 AM:   In build.command from netlify.toml:
11:37:44 AM:   hugo --gc --minify -b $URL
11:37:44 AM: ​
11:37:44 AM:   Resolved config
11:37:44 AM:   build:
11:37:44 AM:     command: hugo --gc --minify -b $URL
11:37:44 AM:     commandOrigin: config
11:37:44 AM:     environment:
11:37:44 AM:       - HUGO_VERSION
11:37:44 AM:       - HUGO_ENABLEGITINFO
11:37:44 AM:       - HUGO_ENV
11:37:44 AM:     publish: /opt/build/repo/public
11:37:44 AM:     publishOrigin: config
11:37:44 AM:   plugins:
11:37:44 AM:     - inputs:
11:37:44 AM:         debug: true
11:37:44 AM:       origin: config
11:37:44 AM:       package: netlify-plugin-hugo-cache-resources
11:37:45 AM: Caching artifacts
11:37:45 AM: Started saving build plugins
11:37:45 AM: Finished saving build plugins
11:37:45 AM: Started saving pip cache
11:37:45 AM: Finished saving pip cache
11:37:45 AM: Started saving emacs cask dependencies
11:37:45 AM: Finished saving emacs cask dependencies
11:37:45 AM: Started saving maven dependencies
11:37:45 AM: Finished saving maven dependencies
11:37:45 AM: Started saving boot dependencies
11:37:45 AM: Finished saving boot dependencies
11:37:45 AM: Started saving rust rustup cache
11:37:45 AM: Finished saving rust rustup cache
11:37:45 AM: Started saving go dependencies
11:37:45 AM: Finished saving go dependencies
11:37:46 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:37:46 AM: Failing build: Failed to build site
11:37:46 AM: Finished processing build request in 20.152s

Link to the page with bug

https://app.netlify.com/sites/rainbow-naiad-c357cb/deploys/64bca075b5c9525c667631f1

Link to the source repository

No response

CaiJimmy commented 1 year ago

Hi I'm a beginner to use Hugo academic.

Then you are in the wrong GitHub repository xD.

mgt-lya commented 1 year ago

😭Okay thank you then. Maybe I need to re-create a repo. Thank you for looking up at question😉

CaiJimmy commented 1 year ago

Maybe I need to re-create a repo.

What I meant was that you are in the wrong GitHub repository to report this issue. This is not the academic theme's repository.