title: npm: module.js:457 throw err; Error: Cannot find module 'npmlog' on a mac using brew
body: <p>I made the mistake (?) of following <a href="https://docs.npmjs.com/getting-started/installing-node" rel="noreferrer">the instructions on the npm getting started page</a> and ran </p>
  
  <pre><code>sudo npm install npm -g
  </code></pre>
  
  <p>Now, no matter what I do, any execution of npm results in this error, whether I run it as sudo or not.  Uninstalling and reinstalling node has not helped.  </p>
  
  <pre><code>$ sudo npm
  
  module.js:457
      throw err;
      ^
  
  Error: Cannot find module 'npmlog'
      at Function.Module._resolveFilename (module.js:455:15)
      at Function.Module._load (module.js:403:25)
      at Module.require (module.js:483:17)
      at require (internal/module.js:20:19)
      at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:13
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/npm/bin/npm-cli.js:75:3)
      at Module._compile (module.js:556:32)
      at Object.Module._extensions..js (module.js:565:10)
      at Module.load (module.js:473:32)
      at tryModuleLoad (module.js:432:12)
  </code></pre>
  
  <p>I am on a mac and installed node using homebrew.</p>