Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/grails/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么我的Angular应用程序在Github页面上是空白的?_Angular_Github Pages - Fatal编程技术网

为什么我的Angular应用程序在Github页面上是空白的?

为什么我的Angular应用程序在Github页面上是空白的?,angular,github-pages,Angular,Github Pages,我试图在jhuynh13.Github.io的Github页面上托管Angular应用程序,但该页面为空白。我查看了开发人员工具,发现了以下错误: 未能加载资源:/runtime-es2015.c5fa8325f89fc516600b.js:1 服务器的响应状态为404() 我搜索了这个文件,在jhuynh13.github.io的repo中找到了它: 我不确定我能用这个文件做什么来调试。这里可能发生了什么?您的基本href看起来像 <base href="<jhuynh

我试图在jhuynh13.Github.io的Github页面上托管Angular应用程序,但该页面为空白。我查看了开发人员工具,发现了以下错误:

未能加载资源:/runtime-es2015.c5fa8325f89fc516600b.js:1 服务器的响应状态为404()

我搜索了这个文件,在jhuynh13.github.io的repo中找到了它:


我不确定我能用这个文件做什么来调试。这里可能发生了什么?

您的基本href看起来像

<base href="<jhuynh13.github.io>">

但它看起来应该是这样的,变成这样

<base href="/">

您的基本href看起来像

<base href="<jhuynh13.github.io>">

但它看起来应该是这样的,变成这样

<base href="/">


我的dist文件夹已过时。我能够通过在angular cli中使用ng build——watch来修复它。现在它可以工作了。

我的dist文件夹已经过时了。我能够通过在angular cli中使用ng build——watch来修复它。现在它可以工作了。

运行时-es2015
!=<代码>运行时-es5。您的屏幕截图中没有该文件的ES2015版本。
runtime-ES2015
!=<代码>运行时-es5。您的屏幕截图中没有该文件的ES2015版本。我在索引html文件中进行了调整,但仍然存在相同的错误。请尝试通过设置type=“text/javascript”而不是type=“module”来解决此问题。在index.htmlIt中,我不得不ng构建并更新dist文件夹,因为ng serve不会自动更新它。现在可以了。感谢输入,我在索引html文件中进行了调整,但仍然存在相同的错误。请尝试通过设置type=“text/javascript”而不是type=“module”来解决此问题。在index.htmlIt中,我不得不ng构建并更新dist文件夹,因为ng serve不会自动更新它。现在可以了。谢谢你的意见