Search code examples
githubdeploymentgit-submodulesnetlify

Deployment Failure - Adding submodule issues - Using Netlify


I am trying to deploy my site to Netlify, when I try to trigger deployment, I am getting this error:

1:46:02 PM: Error checking out submodules: fatal: No url found for submodule path 'startbootstrap-grayscale' in .gitmodules
1:46:02 PM: Failing build: Failed to prepare repo
1:46:02 PM: failed during stage 'preparing repo': Error checking out submodules: fatal: No url found for submodule path 'startbootstrap-grayscale' in .gitmodules

My Folder directory is the one I want to deploy and these are the contents within that directory.

LICENSE             node_modules
README.md           package-lock.json
css                 package.json
gulpfile.js         scss
img                 startbootstrap-grayscale
index.html          vendor
js

As you can see, the error is pointing to the startbootstrap-grayscale directory.

Within that startbootstrap-grayscale directory, everything you see above is within that same directory. (Not sure what I did there to have that happen). If I cd into the 2nd startbootstrap-grayscale directory, there is nothing inside of it.

I was told that I need to git submodule add <my github name> but am not sure what else to add in order to resolve this issue.

git submodule add -f asks for more info:

usage: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
   or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
   or: git submodule [--quiet] init [--] [<path>...]
   or: git submodule [--quiet] deinit [-f|--force] (--all| [--] <path>...)
   or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--[no-]recommend-shallow] [--reference <repository>] [--recursive] [--] [<path>...]
   or: git submodule [--quiet] summary [--cached|--files] [--su mmary-limit <n>] [commit] [--] [<path>...]
   or: git submodule [--quiet] foreach [--recursive] <command>
   or: git submodule [--quiet] sync [--recursive] [--] [<path>...]
   or: git submodule [--quiet] absorbgitdirs [--] [<path>...]

Any suggestions as to what to add in order to fix this issue? Appreciate any help.


Solution

  • I was able to figure it out, I needed to get rid of my startbootstrap-grayscale folder by using rm -r startbootstrap-grayscale and pushing the changes. I had too many nested folders of the same type for some reason.