themefisher / airspace-hugo

Airspace Hugo theme for multipurpose use, like Portfolio, Blog, Business.
https://gethugothemes.com/products/airspace/?utm_source=airspace_github&utm_medium=referral&utm_campaign=github_theme_about
MIT License
351 stars 508 forks source link

Netlify deploy error #154

Closed rodoortiz closed 3 years ago

rodoortiz commented 3 years ago

I'm trying to use the airspace hugo theme for the first time, I've followed the tutorial for easy setup but can't get to deploy it on Netlify, this is what I get:

12:57:21 AM: Build ready to start 12:57:23 AM: build-image version: e4d2dbe4cfec46db257e869258461ded89b75c9b 12:57:23 AM: build-image tag: v3.7.3 12:57:23 AM: buildbot version: 72be25157f962cab632697ed4bd0bc2eb9a16b54 12:57:23 AM: Building without cache 12:57:23 AM: Starting to prepare the repo for build 12:57:23 AM: No cached dependencies found. Cloning fresh repo 12:57:23 AM: git clone https://github.com/rodoortiz/airspace-hugo 12:57:24 AM: Preparing Git Reference refs/heads/master 12:57:25 AM: Parsing package.json dependencies 12:57:26 AM: Starting build script 12:57:26 AM: Installing dependencies 12:57:26 AM: Python version set to 2.7 12:57:27 AM: v12.18.0 is already installed. 12:57:28 AM: Now using node v12.18.0 (npm v6.14.4) 12:57:28 AM: Started restoring cached build plugins 12:57:28 AM: Finished restoring cached build plugins 12:57:28 AM: Attempting ruby version 2.7.1, read from environment 12:57:29 AM: Using ruby version 2.7.1 12:57:29 AM: Using PHP version 5.6 12:57:29 AM: Installing Hugo 0.73.0 12:57:31 AM: Hugo Static Site Generator v0.73.0-428907CC/extended linux/amd64 BuildDate: 2020-06-23T16:40:09Z 12:57:31 AM: Started restoring cached go cache 12:57:31 AM: Finished restoring cached go cache 12:57:31 AM: go version go1.14.4 linux/amd64 12:57:31 AM: go version go1.14.4 linux/amd64 12:57:31 AM: Installing missing commands 12:57:31 AM: Verify run directory 12:57:32 AM: ​ 12:57:32 AM: ──────────────────────────────────────────────────────────────── 12:57:32 AM: Netlify Build
12:57:32 AM: ──────────────────────────────────────────────────────────────── 12:57:32 AM: ​ 12:57:32 AM: ❯ Version 12:57:32 AM: @netlify/build 11.7.3 12:57:32 AM: ​ 12:57:32 AM: ❯ Flags 12:57:32 AM: deployId: 609233c13b2f776b2e1bc6e9 12:57:32 AM: ​ 12:57:32 AM: ❯ Current directory 12:57:32 AM: /opt/build/repo 12:57:32 AM: ​ 12:57:32 AM: ❯ Config file 12:57:32 AM: /opt/build/repo/netlify.toml 12:57:32 AM: ​ 12:57:32 AM: ❯ Context 12:57:32 AM: production 12:57:32 AM: ​ 12:57:32 AM: ──────────────────────────────────────────────────────────────── 12:57:32 AM: 1. build.command from netlify.toml
12:57:32 AM: ──────────────────────────────────────────────────────────────── 12:57:32 AM: ​ 12:57:32 AM: $ cd exampleSite && hugo --gc --themesDir ../.. 12:57:33 AM: Total in 4 ms 12:57:33 AM: panic: interface conversion: interface {} is string, not map[string]interface {} 12:57:33 AM: goroutine 1 [running]: 12:57:33 AM: github.com/nicksnyder/go-i18n/i18n/bundle.parseTranslations(0xc000039ed5, 0x7, 0xc0006e2480, 0x436, 0x436, 0x30579e0, 0x1d536a0, 0xc0009117a0, 0xc000858ec0, 0xe16b97) 12:57:33 AM: /go/pkg/mod/github.com/nicksnyder/go-i18n@v1.10.0/i18n/bundle/bundle.go:100 +0x761 12:57:33 AM: github.com/nicksnyder/go-i18n/i18n/bundle.(Bundle).ParseTranslationFileBytes(0xc000911440, 0xc000039ed5, 0x7, 0xc0006e2480, 0x436, 0x436, 0xc000039e55, 0xc0000f6a90) 12:57:33 AM: /go/pkg/mod/github.com/nicksnyder/go-i18n@v1.10.0/i18n/bundle/bundle.go:75 +0xdb 12:57:33 AM: github.com/gohugoio/hugo/langs/i18n.addTranslationFile(0xc000911440, 0x2374340, 0xc0002bc2d0, 0x4, 0x0) 12:57:33 AM: /root/project/hugo/langs/i18n/translationProvider.go:98 +0x13f 12:57:33 AM: github.com/gohugoio/hugo/langs/i18n.(TranslationProvider).Update(0xc000553880, 0xc000924360, 0x0, 0x0) 12:57:33 AM: /root/project/hugo/langs/i18n/translationProvider.go:79 +0x2d3 12:57:33 AM: github.com/gohugoio/hugo/deps.(Deps).LoadResources(0xc000924360, 0x0, 0x0) 12:57:33 AM: /root/project/hugo/deps/deps.go:180 +0x43 12:57:33 AM: github.com/gohugoio/hugo/hugolib.applyDeps(0xc0008f63f0, 0xc0005549c0, 0xc0006dd560, 0x0, 0x0, 0x236ec20, 0xc0006ba5a0, 0xc0005c7000, 0x17, 0x27, ...) 12:57:33 AM: /root/project/hugo/hugolib/hugo_sites.go:479 +0x37e 12:57:33 AM: github.com/gohugoio/hugo/hugolib.newHugoSites(0xc0008f63f0, 0xc0005549c0, 0x0, 0x0, 0x0, 0x236ec20, 0xc0006ba5a0, 0x0, 0x0, 0x0, ...) 12:57:33 AM: /root/project/hugo/hugolib/hugo_sites.go:364 +0x5d8 12:57:33 AM: github.com/gohugoio/hugo/hugolib.NewHugoSites(0xc0008f63f0, 0xc0005549c0, 0x0, 0x0, 0x0, 0x236ec20, 0xc0006ba5a0, 0x0, 0x0, 0x0, ...) 12:57:33 AM: /root/project/hugo/hugolib/hugo_sites.go:504 +0x122 12:57:33 AM: github.com/gohugoio/hugo/commands.(commandeer).loadConfig.func3() 12:57:33 AM: /root/project/hugo/commands/commandeer.go:402 +0x264 12:57:33 AM: sync.(Once).doSlow(0xc0002d8250, 0xc000859a80) 12:57:33 AM: /usr/local/go/src/sync/once.go:66 +0xec 12:57:33 AM: sync.(Once).Do(...) 12:57:33 AM: /usr/local/go/src/sync/once.go:57 12:57:33 AM: github.com/gohugoio/hugo/commands.(commandeer).loadConfig(0xc0005441a0, 0xc000540001, 0x2338320, 0xc0001a2008) 12:57:33 AM: /root/project/hugo/commands/commandeer.go:361 +0x888 12:57:33 AM: github.com/gohugoio/hugo/commands.newCommandeer(0x1, 0xc0006dbad0, 0x23366a0, 0xc00054f520, 0xc00054f640, 0x0, 0x0, 0x0, 0x1b8f6e0, 0x12b5e01, ...) 12:57:33 AM: /root/project/hugo/commands/commandeer.go:185 +0x241 12:57:33 AM: github.com/gohugoio/hugo/commands.initializeConfig(0x1b80001, 0xc0006dbad0, 0x23366a0, 0xc00054f520, 0xc00054f640, 0xc000859cd8, 0x62ba44, 0xc000592300) 12:57:33 AM: /root/project/hugo/commands/hugo.go:123 +0x76 12:57:33 AM: github.com/gohugoio/hugo/commands.(commandsBuilder).newHugoCmd.func1(0xc000504000, 0xc0002d81e0, 0x0, 0x3, 0x0, 0x0) 12:57:33 AM: /root/project/hugo/commands/commands.go:165 +0x125 12:57:33 AM: github.com/spf13/cobra.(Command).execute(0xc000504000, 0xc0001a6010, 0x3, 0x3, 0xc000504000, 0xc0001a6010) 12:57:33 AM: /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:826 +0x453 12:57:33 AM: github.com/spf13/cobra.(Command).ExecuteC(0xc000504000, 0xc00054f520, 0x8, 0xc00022c100) 12:57:33 AM: /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fb 12:57:33 AM: github.com/gohugoio/hugo/commands.Execute(0xc0001a6010, 0x3, 0x3, 0x4c2b8f, 0xc000182058, 0x0, 0x0) 12:57:33 AM: /root/project/hugo/commands/hugo.go:89 +0xb9 12:57:33 AM: main.main() 12:57:33 AM: /root/project/hugo/main.go:23 +0x6c 12:57:33 AM: ​ 12:57:33 AM: ──────────────────────────────────────────────────────────────── 12:57:33 AM: "build.command" failed
12:57:33 AM: ──────────────────────────────────────────────────────────────── 12:57:33 AM: ​ 12:57:33 AM: Error message 12:57:33 AM: Command failed with exit code 2: cd exampleSite && hugo --gc --themesDir ../.. 12:57:33 AM: ​ 12:57:33 AM: Error location 12:57:33 AM: In build.command from netlify.toml: 12:57:33 AM: cd exampleSite && hugo --gc --themesDir ../.. 12:57:33 AM: ​ 12:57:33 AM: Resolved config 12:57:33 AM: build: 12:57:33 AM: command: cd exampleSite && hugo --gc --themesDir ../.. 12:57:33 AM: commandOrigin: config 12:57:33 AM: environment: 12:57:33 AM: - HUGO_VERSION 12:57:33 AM: - HUGO_THEME 12:57:33 AM: - HUGO_BASEURL 12:57:33 AM: publish: /opt/build/repo/exampleSite/public 12:57:33 AM: redirects: 12:57:33 AM: - from: /fr/ status: 404 to: /fr/404.html - from: /it/ status: 404 to: /it/404.html - from: /* status: 404 to: /404.htmlCaching artifacts 12:57:33 AM: Started saving build plugins 12:57:33 AM: Finished saving build plugins 12:57:33 AM: Started saving pip cache 12:57:33 AM: Finished saving pip cache 12:57:33 AM: Started saving emacs cask dependencies 12:57:33 AM: Finished saving emacs cask dependencies 12:57:33 AM: Started saving maven dependencies 12:57:33 AM: Finished saving maven dependencies 12:57:33 AM: Started saving boot dependencies 12:57:33 AM: Finished saving boot dependencies 12:57:33 AM: Started saving rust rustup cache 12:57:33 AM: Finished saving rust rustup cache 12:57:33 AM: Started saving go dependencies 12:57:33 AM: Finished saving go dependencies 12:57:35 AM: Build failed due to a user error: Build script returned non-zero exit code: 2 12:57:35 AM: Creating deploy upload records 12:57:36 AM: Failing build: Failed to build site 12:57:36 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 12:57:36 AM: Finished processing build request in 13.037080545s

salim-b commented 3 years ago

Try it with latest Hugo 0.83.1 by setting

[build.environment]
  HUGO_VERSION = "0.83.1"

in netlify.toml.

There were significant changes to i18n in Hugo 0.83 and the error seems to be related to the format of the i18n TOML files.

rodoortiz commented 3 years ago

It worked, thank you very much!