title: How can I fix ('throw er; // Unhandled 'error' event') code lifecycle?
body: <p>I tried to create a React app. I used the <strong>command prompt</strong> but after the app was created when I tried to start the npm it gives me some errors.</p>
  
  <p><strong>I tried to create React apps in WebStorm, IntelliJ and Visual Studio Code / PowerShell as well</strong> but still gives the <strong>same set of errors</strong>.</p>
  
  <p>This is the error I get:</p>
  
  <p><a href="https://i.stack.imgur.com/LCHID.png" rel="noreferrer"><img src="https://i.stack.imgur.com/LCHID.png" alt="enter image description here"></a></p>
  
  <p>I tried many things like cleaning the npm cache, reinstalling npm and node, upgrading npm to new versions, tried to upgrade react but nothing worked.</p>
  
  <pre><code>events.js:173
        throw er; // Unhandled 'error' event
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  
  gives some errors : 
  events.js:173
        throw er; // Unhandled 'error' event
        ^
  </code></pre>
  
  <p>but it should start the npm and giving the localhost 3000 </p>