部署失败-添加子模块问题-使用Netlify [英] Deployment Failure - Adding submodule issues - Using Netlify
问题描述
我正在尝试将网站部署到Netlify,当我尝试触发部署时,出现此错误:
1:46:02 PM:检出子模块时出错:致命:.gitmodules
$中未找到子模块路径 startbootstrap-grayscale的网址p $ p>
中未找到子模块路径'startbootstrap-grayscale'的url 1:46:02 PM:生成失败:无法准备回购
1:46:02 PM:在准备回购阶段失败:检出子模块出错:致命:.gitmodules
我的
文件夹
目录是我要部署的目录,这些是该目录中的内容。许可node_modules
README.md package-lock.json
css package.json
gulpfile.js scss
img startbootstrap-grayscale
index.html供应商
js
如您所见,错误指向
startbootstrap-grayscale
目录。
其中
startbootstrap-grayscale
目录,您在上方看到的所有内容都在同一目录中。 (不知道我在那里做了什么)。如果我将cd
放入第二个startbootstrap-grayscale
目录,则其中没有任何内容。
有人告诉我我需要
git子模块添加<我的github名称>
,但不确定要添加什么其他内容来解决这个问题。
git子模块add -f
询问更多信息:用法:git子模块[--quiet]添加[-b< branch>] [-f | --force] [--name< name>] [-参考< repository>] [-]< repository> [< path>]
或:git子模块[--quiet]状态[--cached] [-递归] [-] [< path> ...]
或:git子模块[--quiet]初始化[-] [< path> ...]
或:git子模块[--quiet] deinit [-f | --force](--all | [- ]< path> ...)
或:git子模块[--quiet]更新[--init] [-远程] [-N | --no-fetch] [-f | --force ] [--checkout | --merge | --rebase] [-[no-] recommend-shallow] [--reference< repository>] [--recursive] [-] [< path>。 。]
或:git子模块[--quiet]摘要[--cached | --files] [--summary-limit< n>] [commit] [-] [< path>。 ..]
或:git子模块[--quiet] foreach [-递归]< command>
或:git子模块[--quiet] sync [-递归] [-] [< path> ...]
或:git子模块[--quiet]吸收gitdirs [-] [< path> ...]
任何有关添加内容以解决此问题的建议问题?感谢任何帮助。
解决方案我能够弄清楚,我需要摆脱我的
startbootstrap-grayscale
文件夹,方法是使用rm -r startbootstrap-grayscale
并推送更改。由于某种原因,我有太多相同类型的嵌套文件夹。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 Icd
into the 2ndstartbootstrap-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.
解决方案I was able to figure it out, I needed to get rid of my
startbootstrap-grayscale
folder by usingrm -r startbootstrap-grayscale
and pushing the changes. I had too many nested folders of the same type for some reason.这篇关于部署失败-添加子模块问题-使用Netlify的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!