Deploy error: Base directory does not exist: /opt/build/repo/master

Hi There,

My website is failing to deploy. The project is: goofy-lalande-b507a3. I’m using Hugo Hallo theme.

2:07:12 PM: Build ready to start
2:07:14 PM: build-image version: 9d79ad851d6eff3969322d6e5b1df3d597650c41
2:07:14 PM: build-image tag: v3.3.19
2:07:14 PM: buildbot version: 2cc7ea668a3e8f63326d15aab17e62cd1997fa2e
2:07:14 PM: Fetching cached dependencies
2:07:14 PM: Starting to download cache of 254.6KB
2:07:14 PM: Finished downloading cache in 78.631945ms
2:07:14 PM: Starting to extract cache
2:07:14 PM: Failed to fetch cache, continuing with build
2:07:14 PM: Starting to prepare the repo for build
2:07:15 PM: No cached dependencies found. Cloning fresh repo
2:07:15 PM: git clone
2:07:15 PM: Preparing Git Reference refs/heads/master
2:07:17 PM: Failing build: Failed to parse configuration
2:07:17 PM: Failed during stage ‘Reading and parsing configuration files’:
Base directory does not exist: /opt/build/repo/master
: exit status 1

2:07:17 PM: Finished processing build request in 2.968424958s

Thanks in advance for your support,


I wonder if this error is occurring because I have not specified a base directory in my netlify.toml file?

publish = “public/”
command = “hugo”

I’m not sure what the base should be.

Hey @nzgwynn,
You have some build variables set here:

So it seems like our build system is looking for a directory called “master” that does not exist. Could that be the case? Please also note that the base setting is for a monorepo configuration. If your site isn’t set up that way, you don’t need the base setting at all.

I can’t check out your repo since it’s private, so if you could send your netlify.toml if you’re using one, that would also be helpful. Thanks!

Hi Jen,

Thanks for your response. Here’s the netlify.toml and I made the repo public, there is only one branch and it deployed once but does not update.

publish = “public/”
command = “hugo”

HUGO_VERSION = “0.73.0”
HUGO_ENV = “production”

HUGO_VERSION = “0.73.0”

HUGO_VERSION = “0.73.0”

command = “hugo -b $DEPLOY_PRIME_URL --buildFuture”

command = “hugo -b $DEPLOY_PRIME_URL --buildFuture”

Great, thanks! So first, you should delete the environment variables here:

Just for your reference for the future, you can either set those variables in our UI, as linked above, or in the netlify.toml. The toml will take precedence… unless there’s a “base” set in the UI!

Basically, in this case, it’s just confusing to have both sets, and since you have a toml, let’s just roll with that one. Everything in there looks good to me. Want to delete those things in the UI and then trigger a new deploy here: with the “Trigger deploy” button?

1 Like