mrmierzejewski / hugo-theme-console

Minimal and responsive Hugo theme inspired by the system console, crafted for optimal performance with an average page load time of under one second.
MIT License
449 stars 129 forks source link

netlify.toml deploy error #27

Closed wojciehm closed 3 years ago

wojciehm commented 3 years ago

Hi. Love the theme. Thanks for doing it.

I used your netlify.toml but my build is failing with an error

1:28:54 PM: Preparing Git Reference refs/heads/master
1:28:56 PM: Parsing package.json dependencies
1:28:57 PM: Failing build: Failed to parse configuration
1:28:57 PM: Failed during stage 'Reading and parsing configuration files': 
Base directory does not exist: /opt/build/repo/exampleSite

: exit status 1
1:28:57 PM: Finished processing build request in 5.547958779s

What should I put there?

[build]
base = "exampleSite"
mrmierzejewski commented 3 years ago

Hi @wojciehm,

I've just successfully deployed hugo-theme-console to Netlify. Could you please share logs?

Best, Marcin

wojciehm commented 3 years ago

3:05:15 PM: Build ready to start 3:05:17 PM: build-image version: 3571f0130496395a23bffe9820bc78b4f73a6234 3:05:17 PM: build-image tag: v3.7.0 3:05:17 PM: buildbot version: 42b3cc60804ac676677737b7b2ebb7c640c0de4c 3:05:17 PM: Building without cache 3:05:17 PM: Starting to prepare the repo for build 3:05:17 PM: No cached dependencies found. Cloning fresh repo 3:05:17 PM: git clone https://github.com/wojciehm/fwc.com 3:05:22 PM: Preparing Git Reference refs/heads/master 3:05:23 PM: Parsing package.json dependencies 3:05:24 PM: Failing build: Failed to parse configuration 3:05:24 PM: Failed during stage 'Reading and parsing configuration files': Base directory does not exist: /opt/build/repo/public

: exit status 1 3:05:24 PM: Finished processing build request in 7.919761724s

Best, Wojciech

mrmierzejewski commented 3 years ago

Hi @wojciehm,

I've attached my logs and it works.

3:37:14 PM: Build ready to start
3:37:16 PM: build-image version: xxxx
3:37:16 PM: build-image tag: v3.7.0
3:37:16 PM: buildbot version: xxx
3:37:17 PM: Fetching cached dependencies
3:37:17 PM: Failed to fetch cache, continuing with build
3:37:17 PM: Starting to prepare the repo for build
3:37:17 PM: No cached dependencies found. Cloning fresh repo
3:37:17 PM: git clone https://github.com/mrmierzejewski/hugo-theme-console
3:37:18 PM: Preparing Git Reference refs/heads/master
3:37:19 PM: Parsing package.json dependencies
3:37:20 PM: Different build dir detected, going to use the one specified in the Netlify configuration file: 'exampleSite' versus '' in the Netlify UI
3:37:20 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'exampleSite/public' versus 'public' in the Netlify UI
3:37:20 PM: Starting build script
3:37:20 PM: Installing dependencies
3:37:20 PM: Python version set to 2.7
3:37:22 PM: v12.18.0 is already installed.
3:37:22 PM: Now using node v12.18.0 (npm v6.14.4)
3:37:22 PM: Started restoring cached build plugins
3:37:22 PM: Finished restoring cached build plugins
3:37:23 PM: Attempting ruby version 2.7.1, read from environment
3:37:25 PM: Using ruby version 2.7.1
3:37:25 PM: Using PHP version 5.6
3:37:25 PM: Installing Hugo 0.81.0
3:37:26 PM: hugo v0.81.0-59D15C97+extended linux/amd64 BuildDate=2021-02-19T17:07:12Z VendorInfo=gohugoio
3:37:26 PM: Started restoring cached go cache
3:37:26 PM: Finished restoring cached go cache
3:37:26 PM: go version go1.14.4 linux/amd64
3:37:26 PM: go version go1.14.4 linux/amd64
3:37:26 PM: Installing missing commands
3:37:26 PM: Verify run directory
3:37:28 PM: ​
3:37:28 PM: ────────────────────────────────────────────────────────────────
3:37:28 PM:   Netlify Build                                                 
3:37:28 PM: ────────────────────────────────────────────────────────────────
3:37:28 PM: ​
3:37:28 PM: ❯ Version
3:37:28 PM:   @netlify/build 9.11.2
3:37:28 PM: ​
3:37:28 PM: ❯ Flags
3:37:28 PM:   apiHost: api.netlify.com
3:37:28 PM:   cacheDir: /opt/build/cache
3:37:28 PM:   deployId: xxx
3:37:28 PM:   mode: buildbot
3:37:28 PM:   testOpts:
3:37:28 PM:     silentLingeringProcesses: ''
3:37:28 PM: ​
3:37:28 PM: ❯ Current directory
3:37:28 PM:   /opt/build/repo/exampleSite
3:37:28 PM: ​
3:37:28 PM: ❯ Config file
3:37:28 PM:   /opt/build/repo/netlify.toml
3:37:28 PM: ​
3:37:28 PM: ❯ Context
3:37:28 PM:   production
3:37:28 PM: ​
3:37:28 PM: ────────────────────────────────────────────────────────────────
3:37:28 PM:   1. build.command from netlify.toml                            
3:37:28 PM: ────────────────────────────────────────────────────────────────
3:37:28 PM: ​
3:37:28 PM: $ hugo --gc --minify --themesDir ../../ -t repo -b $URL
3:37:28 PM: Start building sites …
3:37:31 PM:                    | EN
3:37:31 PM: -------------------+-----
3:37:31 PM:   Pages            | 20
3:37:31 PM:   Paginator pages  |  0
3:37:31 PM:   Non-page files   |  6
3:37:31 PM:   Static files     |  7
3:37:31 PM:   Processed images | 14
3:37:31 PM:   Aliases          |  0
3:37:31 PM:   Sitemaps         |  1
3:37:31 PM:   Cleaned          |  0
3:37:31 PM: Total in 2997 ms
3:37:31 PM: ​
3:37:31 PM: (build.command completed in 3.1s)
3:37:31 PM: ​
3:37:31 PM: ────────────────────────────────────────────────────────────────
3:37:31 PM:   2. Deploy site                                                
3:37:31 PM: ────────────────────────────────────────────────────────────────
3:37:31 PM: ​
3:37:31 PM: Starting to deploy site from 'exampleSite/public'
3:37:31 PM: Creating deploy tree 
3:37:32 PM: Creating deploy upload records
3:37:32 PM: 21 new files to upload
3:37:32 PM: 0 new functions to upload
3:37:32 PM: Site deploy was successfully initiated
3:37:32 PM: ​
3:37:32 PM: (Deploy site completed in 760ms)
3:37:32 PM: ​
3:37:32 PM: ────────────────────────────────────────────────────────────────
3:37:32 PM:   Netlify Build Complete                                        
3:37:32 PM: ────────────────────────────────────────────────────────────────
3:37:32 PM: ​
3:37:32 PM: (Netlify Build completed in 3.9s)
3:37:32 PM: Starting post processing
3:37:32 PM: Caching artifacts
3:37:32 PM: Started saving build plugins
3:37:32 PM: Finished saving build plugins
3:37:32 PM: Started saving pip cache
3:37:33 PM: Finished saving pip cache
3:37:33 PM: Started saving emacs cask dependencies
3:37:33 PM: Post processing - HTML
3:37:33 PM: Finished saving emacs cask dependencies
3:37:33 PM: Started saving maven dependencies
3:37:33 PM: Finished saving maven dependencies
3:37:33 PM: Started saving boot dependencies
3:37:33 PM: Finished saving boot dependencies
3:37:33 PM: Started saving rust rustup cache
3:37:33 PM: Finished saving rust rustup cache
3:37:33 PM: Started saving go dependencies
3:37:33 PM: Finished saving go dependencies
3:37:34 PM: Post processing - header rules
3:37:34 PM: Post processing - redirect rules
3:37:34 PM: Post processing done
3:37:34 PM: Site is live ✨
3:37:36 PM: Build script success
wojciehm commented 3 years ago

Would you be so kind and share settings:

[build] base = "exampleSite"

and your Netlify settings?

Here are mine

image

Thanks in advance.

mrmierzejewski commented 3 years ago

I deployed the site using the default configuration:

  1. Create a new site
  2. Continuous Deployment
  3. GitHub ➡️ Choose my repository
  4. Done
wojciehm commented 3 years ago

Thanks for support Marcin.

I discarded your netlify.toml and used this one https://gohugo.io/hosting-and-deployment/hosting-on-netlify/#configure-hugo-version-in-netlify

Now deploy works as expected.