title: How to update npm in WSL 2 Ubuntu
body: <p>I'm trying to update my ancient npm 3.5.2 that is running in the Windows Subsystem for Linux on my Windows 10 to the latest version.</p>
  <p>The command I'm running is as follows:</p>
  <pre><code>sudo npm install -g npm@latest
  </code></pre>
  <p>However, it fails and all I'm getting is the following output:</p>
  <pre><code>WARN engine npm@7.20.5: wanted: {&quot;node&quot;:&quot;&gt;=10&quot;} (current: {&quot;node&quot;:&quot;8.10.0&quot;,&quot;npm&quot;:&quot;3.5.2&quot;})
  /usr/local/lib
  └── (empty)
  sudo apt install wsl
  npm ERR! Linux 5.10.16.3-microsoft-standard-WSL2
  npm ERR! argv &quot;/usr/bin/node&quot; &quot;/usr/bin/npm&quot; &quot;install&quot; &quot;-g&quot; &quot;npm@latest&quot;atest
  npm ERR! node v8.10.0
  npm ERR! npm  v3.5.2
  npm ERR! path /usr/local/lib/node_modules/.staging/@npmcli/ci-detect-c7bf9552
  npm ERR! code ENOENT
  npm ERR! errno -2
  npm ERR! syscall rename
  
  npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/@npmcli/ci-detect-c7bf9552' -&gt; '/usr/local/lib/node_modules/npm/node_modules/@npmcli/ci-detect'
  npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/@npmcli/ci-detect-c7bf9552' -&gt; '/usr/local/lib/node_modules/npm/node_modules/@npmcli/ci-detect'
  npm ERR! enoent This is most likely not a problem with npm itself
  npm ERR! enoent and is related to npm not being able to find a file.
  npm ERR! enoent
  
  npm ERR! Please include the following file with any support request:
  npm ERR!     /mnt/d/Summbit/Humanatomy.Web/npm-debug.log
  npm ERR! code 1
  </code></pre>
  <p>I'm clueless what npm is trying to tell me. Does anyone know what is going on here?</p>