Git submodule cache not getting cleared

Error: 9:18:36 PM: Error checking out submodules: fatal: No url found for submodule path ‘themes/KeepIt’ in .gitmodules

Full log below.

I was able to locally resolve this by doing:

git rm --cached themes/KeepIt
git submodule update --init

But see no such way of doing this in Netlify. I even tried deleting cache and re-deploying.

9:18:30 PM: Build ready to start

9:18:35 PM: build-image version: 9289b698a503f132b265bd089ab40ce1d6f9e65e (focal)

9:18:35 PM: build-image tag: v4.12.0

9:18:35 PM: buildbot version: c87074660cd9a4568c0ac759bc083987e94204b3

9:18:35 PM: Building without cache

9:18:35 PM: Starting to prepare the repo for build

9:18:36 PM: No cached dependencies found. Cloning fresh repo

9:18:36 PM: git clone https://github.com/Arsenalist/zararsiddiqi.com

9:18:36 PM: Preparing Git Reference refs/heads/main

9:18:36 PM: Error checking out submodules: fatal: No url found for submodule path 'themes/KeepIt' in .gitmodules

9:18:36 PM: Creating deploy upload records

9:18:36 PM: Failing build: Failed to prepare repo

9:18:36 PM: Failed during stage 'preparing repo': Error checking out submodules: fatal: No url found for submodule path 'themes/KeepIt' in .gitmodules
: exit status 128

9:18:37 PM: Finished processing build request in 1.218902118s

Hi @Arsenalist

In the .gitmodules project file, the only module with a url is themes/hugo-theme-anubis (and this invalid.) All the other modules in themes have no corresponding url in .gitmodules. You might find this support guide useful

Hi @coelmay, this is my .gitmodules file:

[submodule "themes/hugo-theme-anubis"]
	path = themes/hugo-theme-anubis
	url = https://github.com/Mitrichius/hugo-theme-anubis.git

Why do you think the URL is invalid?

Please see my original post. This appears to be a caching problem where older submodules are being cached, instead of the new file being read.

The invalid URL is for themes/KeepIt as below

These are the themes in the repository.

The only one with a URL is .gitmodules is hugo-theme-anubis (hence why it is blue.) You need to fix (add) the required submodule details for these (as per the error message above.)