ng command throws error; @angular-devkit/core seems to be missing : <p>I'm a little new to Angular, so apologies if this question has been asked many times.  Certainly, I have found MANY github issues with similar symptoms, but no clear solution (or it's a problem that keeps coming back).</p>

<h2>PROBLEM:</h2>

<p>I installed whatever the latest version of Angular comes from npm:</p>

<p><code>npm install -g @angular/cli</code></p>

<p>When I run <code>ng</code> (with any options, even if just <code>ng --version</code>), I get the following error:</p>

<pre><code>module.js:540
    throw err;
    ^

Error: Cannot find module '@angular-devkit/core'
    at Function.Module._resolveFilename (module.js:538:15)
    ...
    ...
</code></pre>

<h2>APPARENT SOLUTION:</h2>

<p>Installing <code>@angular-devkit/core</code> seems to fix the problem:</p>

<p><code>npm install -g @angular-devkit/core</code></p>

<p>... well, almost...</p>

<p>I then have to make sure I ALSO install the same devkit component <strong>for each application</strong>:</p>

<p><code>npm install --save @angular-devkit/core</code></p>

<h2>QUESTIONS:</h2>

<p>Is there a problem with Angular's packaging?</p>

<p>Do they deliberately leave out the devkit/core component, or just an accident with some versions?</p>

<p>OR, Could it be that I am doing something wrong?</p>

<hr>

<p><strong>SOFTWARE VERSIONS:</strong></p>

<ul>
<li>Angular CLI: 1.6.4</li>
<li>Node: 8.9.4</li>
<li>OS: linux x64</li>
<li>Angular: 5.2.1</li>
</ul>
