2017-03-28 48 views
0

我運行以下命令:npm i -g angular-cli-ghpages角2:github上部署問題

後,我跑以下命令:ng github-pages:deploy

爲什麼我總是得到以下信息:

The specified command github-pages:deploy is invalid. For available options, see `ng help`. 

回答

0

納克github-pages:deploy從最新的角色版本中刪除

要做這個運行:

ng build --prod --base-href "https://USERNAME.github.io/REPOSITORY/" 
angular-cli-ghpages [OPTIONS] 

更多信息請參見angular-cli-ghpages

0

,一旦你使用

ng build --prod --base-href "https://USERNAME.github.io/REPOSITORY/" 

檢查是否已在dist文件夾中的所有文件建立與--base-HREF項目。 您需要轉到您的存儲庫設置並啓用gh-pages分支上的部署。一旦做到這一點去命令提示符並運行

ngh 

你可以找到 https://www.npmjs.com/package/angular-cli-ghpages

分步說明