title: Error deploying Angular4 to ghpages using angular-cli-ghpages
body: <p>I am trying to deploy a simple Angular 4 app to gh-pages. I have tried several methods and it seems that angular-cli-ghpages is the most up to date way to do it.</p>
  
  <p>I've followed the instructions on the npm <a href="https://www.npmjs.com/package/angular-cli-ghpages" rel="noreferrer">angular-cli-ghpages page</a>.</p>
  
  <p>First I installed successfully angular-cli-ghpages,</p>
  
  <p>$ sudo npm i -g angular-cli-ghpages</p>
  
  <p>This command wouldn't work without sudo.</p>
  
  <p>Next I created the dist folder and set the base-href,</p>
  
  <p>$ ng build --prod --base-href "<a href="https://shanegibney.github.io/mathapp/" rel="noreferrer">https://shanegibney.github.io/mathapp/</a>"</p>
  
  <p>Then I deployed with, </p>
  
  <p>$ ngh</p>
  
  <p>but this gives errors,</p>
  
  <p>The output can be seen in this image below,</p>
  
  <p><a href="https://i.stack.imgur.com/dJkBo.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/dJkBo.jpg" alt="enter image description here"></a></p>
  
  <p>Running angular-cli-ghpages instead of ngh produces the same error,</p>
  
  <p><a href="https://i.stack.imgur.com/Jb6yE.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/Jb6yE.jpg" alt="enter image description here"></a></p>
  
  <p>I am using the following versions,</p>
  
  <p>npm 3.10.10</p>
  
  <p>angular-cli-ghpages ^0.5.1</p>
  
  <p>node 6.9.4 (not really an issue here)</p>
  
  <p>Thanks</p>