2016-12-14 104 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]