boratanrikulu / eternity

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

Deployment failed on Cloudflare Pages #12

Closed pokemaster974 closed 2 years ago

pokemaster974 commented 2 years ago

Hi, I've tried to deploy the repo to a Cloudlfare Pages but I get errors. It's exactly the same commit (the lastest) of the repo that I use for Netlify or Vercel or GH Pages deployments with success.

Here's the log of the failed build/deployment :

2022-10-18T08:30:25.14444Z  Cloning repository...
2022-10-18T08:30:27.718403Z From https://github.com/pokemaster974/cys-photographie.github.io
2022-10-18T08:30:27.719073Z  * branch            0a85f0a46ee10ff7f952ab35e546ebd1c9d11940 -> FETCH_HEAD
2022-10-18T08:30:27.719287Z 
2022-10-18T08:30:27.979758Z HEAD is now at 0a85f0a Update gh-pages.yml
2022-10-18T08:30:27.98035Z  
2022-10-18T08:30:31.637822Z Submodule 'themes/eternity' (https://github.com/boratanrikulu/eternity.git) registered for path 'themes/eternity'
2022-10-18T08:30:31.638378Z Cloning into '/opt/buildhome/clone/themes/eternity'...
2022-10-18T08:30:31.638635Z Submodule path 'themes/eternity': checked out '066fee0f7d51c14e48cb98558f820732f1bb18f8'
2022-10-18T08:30:31.638788Z 
2022-10-18T08:30:31.665656Z Success: Finished cloning repository files
2022-10-18T08:30:32.54957Z  Installing dependencies
2022-10-18T08:30:32.560954Z Python version set to 2.7
2022-10-18T08:30:35.761979Z v12.18.0 is already installed.
2022-10-18T08:30:36.931074Z Now using node v12.18.0 (npm v6.14.4)
2022-10-18T08:30:37.152798Z Started restoring cached build plugins
2022-10-18T08:30:37.16799Z  Finished restoring cached build plugins
2022-10-18T08:30:37.638058Z Attempting ruby version 2.7.1, read from environment
2022-10-18T08:30:40.995897Z Using ruby version 2.7.1
2022-10-18T08:30:41.349573Z Using PHP version 5.6
2022-10-18T08:30:41.503467Z 5.2 is already installed.
2022-10-18T08:30:41.528682Z Using Swift version 5.2
2022-10-18T08:30:41.529Z    Installing Hugo 0.54.0
2022-10-18T08:30:42.211551Z Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z
2022-10-18T08:30:42.216017Z Started restoring cached go cache
2022-10-18T08:30:42.23294Z  Finished restoring cached go cache
2022-10-18T08:30:42.37004Z  go version go1.14.4 linux/amd64
2022-10-18T08:30:42.384531Z go version go1.14.4 linux/amd64
2022-10-18T08:30:42.387549Z Installing missing commands
2022-10-18T08:30:42.387814Z Verify run directory
2022-10-18T08:30:42.387952Z Executing user command: hugo -b $CF_PAGES_URL
2022-10-18T08:30:52.629382Z Building sites … ERROR 2022/10/18 08:30:52 render of "taxonomy" failed: execute of template failed: template: _default/list.html:3:3: executing "_default/list.html" at <partial "slides/colu...>: error calling partial: "/opt/buildhome/repo/layouts/partials/slides/columns.html:23:20": execute of template failed: template: partials/slides/columns.html:23:20: executing "partials/slides/columns.html" at <index .ctx.Site.Para...>: error calling index: value is nil; should be of type string
2022-10-18T08:30:52.62972Z  ERROR 2022/10/18 08:30:52 render of "taxonomy" failed: execute of template failed: template: _default/list.html:3:3: executing "_default/list.html" at <partial "slides/colu...>: error calling partial: "/opt/buildhome/repo/layouts/partials/slides/columns.html:23:20": execute of template failed: template: partials/slides/columns.html:23:20: executing "partials/slides/columns.html" at <index .ctx.Site.Para...>: error calling index: value is nil; should be of type string
2022-10-18T08:30:52.629889Z ERROR 2022/10/18 08:30:52 render of "taxonomy" failed: execute of template failed: template: _default/list.html:3:3: executing "_default/list.html" at <partial "slides/colu...>: error calling partial: "/opt/buildhome/repo/layouts/partials/slides/columns.html:23:20": execute of template failed: template: partials/slides/columns.html:23:20: executing "partials/slides/columns.html" at <index .ctx.Site.Para...>: error calling index: value is nil; should be of type string
2022-10-18T08:30:52.630061Z ERROR 2022/10/18 08:30:52 render of "taxonomy" failed: execute of template failed: template: _default/list.html:3:3: executing "_default/list.html" at <partial "slides/colu...>: error calling partial: "/opt/buildhome/repo/layouts/partials/slides/columns.html:23:20": execute of template failed: template: partials/slides/columns.html:23:20: executing "partials/slides/columns.html" at <index .ctx.Site.Para...>: error calling index: value is nil; should be of type string
2022-10-18T08:30:52.630218Z ERROR 2022/10/18 08:30:52 render of "taxonomy" failed: execute of template failed: template: _default/list.html:3:3: executing "_default/list.html" at <partial "slides/colu...>: error calling partial: "/opt/buildhome/repo/layouts/partials/slides/columns.html:23:20": execute of template failed: template: partials/slides/columns.html:23:20: executing "partials/slides/columns.html" at <index .ctx.Site.Para...>: error calling index: value is nil; should be of type string
2022-10-18T08:30:52.630338Z Total in 10177 ms
2022-10-18T08:30:52.630499Z Error: Error building site: failed to render pages: render of "section" failed: "/opt/buildhome/repo/layouts/nouveautes/nouveautes.html:13:74": execute of template failed: template: nouveautes/nouveautes.html:18:11: executing "nouveautes/nouveautes.html" at <partial "slides/slid...>: error calling partial: "/opt/buildhome/repo/layouts/partials/slides/slide_new.html:13:74": execute of template failed: template: partials/slides/slide_new.html:13:74: executing "partials/slides/slide_new.html" at <$.ctx.Page.RelPermal...>: can't evaluate field Page in type interface {}
2022-10-18T08:30:52.639863Z Failed: build command exited with code: 255
2022-10-18T08:30:53.734852Z Failed: an internal error occurred

Regards.

boratanrikulu commented 2 years ago

Hi @pokemaster974

This Hugo version is quite old https://github.com/gohugoio/hugo/releases/tag/v0.54.0
Please, use newer versions. https://developers.cloudflare.com/pages/framework-guides/deploy-a-hugo-site/#using-a-specific-hugo-version

pokemaster974 commented 2 years ago

Yes it's working with the latest version 0.104.3. I've tried "latest" as env variable but it failed to retrieve the latest. I don't know if there is a solution for this but I close it as it have been solved (no more error). Thanks !