Deploy Fails Due to Missing Submodule URL in .gitmodules

Hi everyone,

I’m trying to deploy a project to Netlify from my GitHub repo, but the build keeps failing during the “preparing repo” stage. Here’s the relevant part of the deploy log:

Code

11:28:36 AM: git clone --filter=blob:none https://github.com/my3s/FIT5120-Main-Project
11:28:36 AM: Preparing Git Reference refs/heads/main
11:28:37 AM: Error checking out submodules: fatal: No url found for submodule path 'js-samples' in .gitmodules
: exit status 128
11:28:37 AM: Failing build: Failed to prepare repo

It looks like the issue is with a submodule called js-samples. The error suggests that the .gitmodules file is missing the URL for this submodule, which causes the build to fail.

I’m not sure if this submodule is still needed, but I’d love advice on how to resolve this:

  • Should I remove the submodule entirely?

  • Or should I fix the .gitmodules file with the correct URL?

  • Is there a way to tell Netlify to ignore submodules during deploy?

Any help or guidance would be greatly appreciated!

Thanks in advance

Hi, @my3s. That is a private Git repository so no one can see it but you. This means we have no way to answer your questions as we would need to examine the repo to do so.

Are you going to make the repo public? If so, please let us know.

Regarding your questions:

  • Should I remove the submodule entirely?

No one can say without being able to see the repo and, even then, additional context may be required to answer.

  • Or should I fix the .gitmodules file with the correct URL?

No one can say without being able to see the repo and, even then, additional context may be required to answer.

  • Is there a way to tell Netlify to ignore submodules during deploy?

There is not except to remove the submodule from the repo.

If there are follow-up questions or if you make the repo public, please let us know.