I am trying to deploy my angular 2 application on github pages so that I can view the application on a github hosted link, but so far no luck.
As soon as I finished my application, I ran the following commands:
ng build --prod git remote add origin "My REPO" git commit -a git push -u origin master
Then I tried to run on the terminal
ng github-pages:deploy
and got this error:
The specified command github-pages:deploy is invalid. For available options, see `ng help`.
After researching, I looked at this page and followed the following instructions: https://www.npmjs.com/package/angular-cli-github-pages
I installed angular-cli-github pages via npm in the project directory:
npm install
he says that I need to create gh pages, so I ran the following command:
git checkout --orphan gh-pages
and then committed the files and pushed the changes and returned to the original host and ran the deploy command and it gave me the same error:
The specified command github-pages:deploy is invalid. For available options, see `ng help`.
I go back and forth in many ways, and it doesn't work. Can someone please indicate what I have to do to correctly place this on github pages?
source share