I have been trying to build my site with different ways yet I fail to know how to make it work, on my local environment I can do cd exampleSite && hugo --themesDir …/… yet on Netlify it fails.
10:54:24 AM: Verify run directory
10:54:26 AM:
10:54:26 AM: ────────────────────────────────────────────────────────────────
10:54:26 AM: Netlify Build
10:54:26 AM: ────────────────────────────────────────────────────────────────
10:54:26 AM:
10:54:26 AM: ❯ Version
10:54:26 AM: @netlify/build 26.0.2
10:54:26 AM:
10:54:26 AM: ❯ Flags
10:54:26 AM: baseRelDir: true
10:54:26 AM: buildId: 61c5fb39faeddf0007e171bc
10:54:26 AM: deployId: 61c5fb39faeddf0007e171be
10:54:26 AM:
10:54:26 AM: ❯ Current directory
10:54:26 AM: /opt/build/repo
10:54:26 AM:
10:54:26 AM: ❯ Config file
10:54:26 AM: /opt/build/repo/netlify.toml
10:54:26 AM:
10:54:26 AM: ❯ Context
10:54:26 AM: production
10:54:26 AM:
10:54:26 AM: ────────────────────────────────────────────────────────────────
10:54:26 AM: 1. build.command from netlify.toml
10:54:26 AM: ────────────────────────────────────────────────────────────────
10:54:26 AM:
10:54:26 AM: $ cd exampleSite && hugo --minify --themesDir ../..
10:54:26 AM: Error: module "Hugo-Doodle" not found; either add it as a Hugo Module or store it in "/opt/build".: module does not exist
10:54:26 AM: Total in 0 ms
10:54:26 AM:
10:54:26 AM: ────────────────────────────────────────────────────────────────
10:54:26 AM: "build.command" failed
10:54:26 AM: ────────────────────────────────────────────────────────────────
10:54:26 AM:
10:54:26 AM: Error message
10:54:26 AM: Command failed with exit code 255: cd exampleSite && hugo --minify --themesDir ../..
10:54:26 AM:
10:54:26 AM: Error location
10:54:26 AM: In build.command from netlify.toml:
10:54:26 AM: cd exampleSite && hugo --minify --themesDir ../..
10:54:26 AM:
10:54:26 AM: Resolved config
10:54:26 AM: build:
10:54:26 AM: command: cd exampleSite && hugo --minify --themesDir ../..
10:54:26 AM: commandOrigin: config
10:54:26 AM: environment:
10:54:26 AM: - HUGO_BASEURL
10:54:26 AM: - HUGO_VERSION
10:54:26 AM: - HUGO_THEME
10:54:26 AM: publish: /opt/build/repo/exampleSite/public
10:54:26 AM: publishOrigin: config
Here is my netlify.toml:
[build]
command = "cd exampleSite && hugo --minify --themesDir ../.."
publish = "exampleSite/public"
[build.environment]
HUGO_BASEURL = "https://Hugo-Doodle.netlify.app"
HUGO_THEME = "Hugo-Doodle"
HUGO_VERSION = "0.90.1"
Here is my repo: GitHub - 1hiking/Hugo-Doodle: A Hugo theme based on DoodleCSS