Error with build due to submodule

I’m getting the following error (twice) when my Hugo site tries to build:

11:18:20 PM: Error checking out submodules: Submodule 'themes/PaperMod' (https://github.com/adityatelange/hugo-PaperMod) registered for path 'themes/PaperMod'
Cloning into '/opt/build/repo/themes/PaperMod'...
fatal: remote error: upload-pack: not our ref cbf128972cbc3ac061e48b09de35da08835b3add
Fetched in submodule path 'themes/PaperMod', but it did not contain cbf128972cbc3ac061e48b09de35da08835b3add. Direct fetching of that commit failed.

any idea what I might be doing wrong?

Welcome to the Forums @owenvachell

Are you able to link to your deploy log (if public) or post full log (if private)?
Is your repo public so others can test it?

Thanks for the quick reply. This is my repo:
https://github.com/owenvachell/My-Personal-Blog

Not 100% if my Netlify site is public. It’s here if you can access it:

This is the full print out from my log:

11:18:14 PM: Build ready to start
11:18:15 PM: build-image version: 6c366b9e0cc38bb3f3a40b7951f398b33cac286d
11:18:15 PM: build-image tag: v3.8.1
11:18:15 PM: buildbot version: d6f7e5fc881fb3682c2d42eb968d84e9b04dfca0
11:18:15 PM: Building without cache
11:18:15 PM: Starting to prepare the repo for build
11:18:16 PM: No cached dependencies found. Cloning fresh repo
11:18:16 PM: git clone https://github.com/owenvachell/My-Personal-Blog
11:18:17 PM: Preparing Git Reference refs/heads/master
11:18:20 PM: Error checking out submodules: Submodule 'themes/PaperMod' (https://github.com/adityatelange/hugo-PaperMod) registered for path 'themes/PaperMod'
Cloning into '/opt/build/repo/themes/PaperMod'...
fatal: remote error: upload-pack: not our ref cbf128972cbc3ac061e48b09de35da08835b3add
Fetched in submodule path 'themes/PaperMod', but it did not contain cbf128972cbc3ac061e48b09de35da08835b3add. Direct fetching of that commit failed.
11:18:20 PM: Creating deploy upload records
11:18:20 PM: Failing build: Failed to prepare repo
11:18:20 PM: Failed during stage 'preparing repo': Error checking out submodules: Submodule 'themes/PaperMod' (https://github.com/adityatelange/hugo-PaperMod) registered for path 'themes/PaperMod'
Cloning into '/opt/build/repo/themes/PaperMod'...
fatal: remote error: upload-pack: not our ref cbf128972cbc3ac061e48b09de35da08835b3add
Fetched in submodule path 'themes/PaperMod', but it did not contain cbf128972cbc3ac061e48b09de35da08835b3add. Direct fetching of that commit failed.
: exit status 1
11:18:20 PM: Finished processing build request in 4.878592793s

The link to PaperMod in your themes directory returns a 404 therefore the build bot can’t build so throws an error.

1 Like

Thank you for pointing me in the right direction. That’s fixed now.

Hi Owen, I am running into the same issue with Hugo, same theme, how did you fix it?

Hi, blaiseAI. I am having this same problem. Did you have any luck?

solution
You could try rebuild with cache cleared.

Just click retry -> Clear cache and deploy site