Angular 6 - 将 Angular 6 部署到 Github 页面错误
Angular 6 - Deploy Angular 6 to Github Pages error
我想在 github 中部署我的 angular 项目。
我收到此错误:
我尝试直接构建 dist 但没有。
我们将不胜感激任何帮助
****编辑:
我尝试 运行 git 远程设置-url.. 和 ngh --no-silent
目前我得到这个:
根据这一行,我猜它与 dist 文件夹有关:
'C:\Users\user\Desktop\Yaffa\todo-list\dist\index.html'
但我运行ngh --dir=dist/todo-list
在 angular.json
文件中有:"outputPath": "dist/todo-list",
所以我不明白哪里出了问题
试试这个..
1) 首先通过git remote set-url ..
设置原点
2) 运行 与 ngh --no-silent
它将发布到 git origin
经过大量搜索..
我所做的是:
- 我更新了 git 版本(这有助于解决“
fatal: HttpRequestException encountered
”错误)。
- 我将
angular.json
中的行更改为:"outputPath": "dist/"
并将所有文件直接复制到 dist 文件夹。
在 cmd 运行:
ngh setup
ngh --no-silent --dir=dist/
希望对您有所帮助
我想在 github 中部署我的 angular 项目。
我收到此错误:
我尝试直接构建 dist 但没有。 我们将不胜感激任何帮助
****编辑:
我尝试 运行 git 远程设置-url.. 和 ngh --no-silent
目前我得到这个:
根据这一行,我猜它与 dist 文件夹有关:
'C:\Users\user\Desktop\Yaffa\todo-list\dist\index.html'
但我运行ngh --dir=dist/todo-list
在 angular.json
文件中有:"outputPath": "dist/todo-list",
所以我不明白哪里出了问题
试试这个..
1) 首先通过git remote set-url ..
2) 运行 与 ngh --no-silent
它将发布到 git origin
经过大量搜索..
我所做的是:
- 我更新了 git 版本(这有助于解决“
fatal: HttpRequestException encountered
”错误)。 - 我将
angular.json
中的行更改为:"outputPath": "dist/"
并将所有文件直接复制到 dist 文件夹。 在 cmd 运行:
ngh setup ngh --no-silent --dir=dist/
希望对您有所帮助