首页 > 解决方案 > 在 github 上面临 Angular-6 部署错误

问题描述

我正在按照本教程使用 github 部署 Angular 应用程序。 https://dzone.com/articles/how-to-deploy-an-angular-application-to-github 最后,我面临这个错误 在此处输入图像描述

我用来部署应用程序的命令是:-

 npm install -g angular-cli-ghpages
$ ng build --prod --base-href https://sahilkatia.github.io/resume/

(其中 sahilkatia 是我的用户名,resume 是我的存储库名称)

最后

ngh -no-silent

标签: angulardeploymentgithub-pages

解决方案


这可能是因为您的简历存储库:

https://github.com/sahilkatia/resume/tree/gh-pages/resume
https://github.com/sahilkatia/resume/blob/gh-pages/resume/index.html

gh-pages 分支应直接包含您的简历内容,而不是包含简历内容的文件夹 resume

也就是说,您应该能够index.html直接访问:

https://github.com/sahilkatia/resume/blob/gh-pages/index.html

推荐阅读