title: npm stops working after install of discord.js
body: <p>I am using NodeJS v8.9.4, on a Windows 10</p>
  
  <p>I was trying to create a discord bot, so I installed discord.js</p>
  
  <pre><code>npm install discord.js
  </code></pre>
  
  <p>But then it gave me an error that said that <code>makedirs</code> was not allowed.</p>
  
  <p>So I fixed the problem by running command prompt as admin.</p>
  
  <p>(<em>This mistake is here in case it is related to the problem at hand</em>)</p>
  
  <p>Then later, running the js source file, I get the error</p>
  
  <pre class="lang-none prettyprint-override"><code>Error: Cannot find module 'discord.js'
  at Function.Module._resolveFilename (module.js:538:15)
  at Function.Module._load (module.js:468:25)
  at Module.require (module.js:587:17)
  at require (internal/module.js:11:18)
  at Object.&lt;anonymous&gt; (filepath)
  at Module._compile (module.js:643:30)
  at Object.Module._extensions..js (module.js:654:10)
  at Module.load (module.js:556:32)
  at tryModuleLoad (module.js:499:12)
  at Function.Module._load (module.js:491:3)
  </code></pre>
  
  <p>Then I tried reinstalling discord.js, when I find that all npm commands result in</p>
  
  <pre class="lang-none prettyprint-override"><code>module.js:540
      throw err;
      ^
  
  Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\npm-
  cli.js'
      at Function.Module._resolveFilename (module.js:538:15)
      at Function.Module._load (module.js:468:25)
      at Function.Module.runMain (module.js:684:10)
      at startup (bootstrap_node.js:187:16)
      at bootstrap_node.js:608:3
  module.js:540
      throw err;
      ^
  
  Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\npm-
  cli.js'
      at Function.Module._resolveFilename (module.js:538:15)
      at Function.Module._load (module.js:468:25)
      at Function.Module.runMain (module.js:684:10)
      at startup (bootstrap_node.js:187:16)
      at bootstrap_node.js:608:3
  </code></pre>
  
  <p>Any commands will return the errors above, regardless of what it is. I tried restarting the computer, but it did not work.</p>
  
  <p>Can anyone help me?</p>
  
  <p>All the SO questions I found were either using MacOS solutions or just completely uninstalling npm or NodeJS. I want to avoid any uninstallation unless it is necessary.</p>