我一直试图在github页面上部署一个示例应用程序,但每次运行ng github-pages:deploy时它总是给我一个错误。下面是我得到的错误:
命令失败: git rm -r用法: git rm ...
-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 ...
-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)任何帮助都将不胜感激。
发布于 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页面更容易了
用法:
ng build --prod --base-href "https://USERNAME.github.io/REPOSITORY/"
angular-cli-ghpages [OPTIONS]还有一个更短的ngh命令可用
ng build --prod --base-href "https://USERNAME.github.io/REPOSITORY/"
ngh [OPTIONS]https://stackoverflow.com/questions/41137642
复制相似问题