首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ng github-pages:部署错误

ng github-pages:部署错误
EN

Stack Overflow用户
提问于 2016-12-14 16:10:04
回答 1查看 241关注 0票数 0

我一直试图在github页面上部署一个示例应用程序,但每次运行ng github-pages:deploy时它总是给我一个错误。下面是我得到的错误:

命令失败: git rm -r用法: git rm ...

代码语言:javascript
复制
-n, --dry-run         dry run
-q, --quiet           do not list removed files
--cached              only remove from the index
-f, --force           override the up-to-date check
-r                    allow recursive removal
--ignore-unmatch      exit with a zero status even if nothing matched

错误:命令失败: git rm -r用法: git rm ...

代码语言:javascript
复制
-n, --dry-run         dry run
-q, --quiet           do not list removed files
--cached              only remove from the index
-f, --force           override the up-to-date check
-r                    allow recursive removal
--ignore-unmatch      exit with a zero status even if nothing matched


at ChildProcess.exithandler (child_process.js:206:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

任何帮助都将不胜感激。

EN

回答 1

Stack Overflow用户

发布于 2017-04-07 17:45:39

对于将来的访问者,github页面部署已经从ng-cli中删除,并将作为不同的npm refactor(@angular/cli): removed the github pages deploy command #4385 提供。

但现在看来,使用https://github.com/angular-buch/angular-cli-ghpages将angular应用程序部署到github页面更容易了

用法:

代码语言:javascript
复制
ng build --prod --base-href "https://USERNAME.github.io/REPOSITORY/"
angular-cli-ghpages [OPTIONS]

还有一个更短的ngh命令可用

代码语言:javascript
复制
ng build --prod --base-href "https://USERNAME.github.io/REPOSITORY/"
ngh [OPTIONS]
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41137642

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档