Error: Cannot find module 'semver'
<p>I was working on a simple Ionic App.</p>

<p>Steps taken:</p>

<ul>
<li>updated ionic - OK </li>
<li>started new project - OK </li>
<li>created a couple of pages- OK</li>
<li>served the app - OK</li>
</ul>

<p>but then I tried to add the android platform:</p>

<blockquote>
  <p><em>ionic platform add android</em></p>
</blockquote>

<p>and got this error:</p>

<blockquote>
  <p>ERROR: Cannot find module 'semver'
     at Function.Module._resolveFilename (module.js:336:15)</p>
  
  <p>Caught exception:
   undefined</p>
</blockquote>

<p>Any idea on why I'm getting this error and how to fix it?</p>

<p>Thanks!</p>