2016-12-14 46 views
0

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

命令失败: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) 

任何帮助将不胜感激。

回答

0

对于未来的游客,GitHub的网页部署已经从NG-CLI删除,将作为不同的NPM refactor(@angular/cli): removed the github pages deploy command #4385

但它看起来像部署的角度应用到GitHub上的页面现在与https://github.com/angular-buch/angular-cli-ghpages

更不费力

用法:

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]