title: Angular 7 CLI ng generate component error: 'Cannot read property 'sourceRoot' of undefined'
body: <p>I was receiving the following error when I tried to run the following command on the CLI: </p>
  
  <pre><code>ng generate component [component-name]
  </code></pre>
  
  <p>I kept getting:</p>
  
  <pre><code>Cannot read property 'sourceRoot' of undefined
  </code></pre>
  
  <p>I am guessing I started getting it after updating the version of angular I was on. <a href="https://i.stack.imgur.com/W51fi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W51fi.png" alt="Cannot read property &#39;sourceRoot&#39; of undefined"></a></p>
  
  <p>See reply for solution.</p>