title: npm is broken and i can not run any npm command
body: <p>My npm is broken and I could not run any npm command.</p>
  
  <pre><code>$ type npm
  npm is hashed (/usr/local/bin/npm)
  
  $ type node
  node is hashed (/usr/local/bin/node)
  
  $ type nodejs
  nodejs is hashed (/usr/bin/nodejs)
  
  $ uname -a 
  Linux mj-lp-mint 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
  </code></pre>
  
  <p>Versions:</p>
  
  <pre><code>$ node -v
  v11.0.0
  
  $ nodejs -v
  v10.13.0
  </code></pre>
  
  <p>Following npm command gave this error:</p>
  
  <pre><code>$ sudo npm install npm -g
  
  /usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:57
  log.progressEnabled = log.gauge.isEnabled()
                                  ^
  
  TypeError: log.gauge.isEnabled is not a function
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:57:33)
      at Module._compile (internal/modules/cjs/loader.js:707:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)
      at Module.load (internal/modules/cjs/loader.js:605:32)
      at tryModuleLoad (internal/modules/cjs/loader.js:544:12)
      at Function.Module._load (internal/modules/cjs/loader.js:536:3)
      at Module.require (internal/modules/cjs/loader.js:643:17)
      at require (internal/modules/cjs/helpers.js:22:18)
      at /usr/local/lib/node_modules/npm/bin/npm-cli.js:22:13
      at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/npm/bin/npm-cli.js:153:3)
  </code></pre>
  
  <p>Why <strong>node</strong> and <strong>nodejs</strong> has different versions and  <strong>npm -v</strong> gave same error.</p>