DEV Community

The Jared Wilcurt
The Jared Wilcurt

Posted on

Node 14 with npm 7 using nvm-windows

  • If you have not installed a Node Version Manager, you might want to try Volta first, it may be easier than nvm-windows
  • If you've already installed nvm-windows and don't want to rip it out to try something else (like me), then you'll find setting up different npm versions than what ships with Node to be quite annoying
  • Doing a simple npm install -g npm@7.24.0 runs, but fails. So here's the process to get this done:

Instructions

  1. nvm install 14.20.0 - The last release of v14
  2. nvm install 16.10.0 - Comes with the last released version of npm 7 (7.24.0)
    • Note: If you are following this guide for different Node/npm versions, it will work the same, just consult Node's releases docs for which versions to use for your use case
  3. nvm use 16.10.0 - This is so we can manipulate v14 while not running it globally
  4. node -v && npm -v - Should give 16.10.0 and 7.24.0
  5. Go to this folder %APPDATA%\nvm\v16.10.0\node_modules
    • Paste it into the Start Menu search > Enter
    • or, WinKey + R > Paste > OK
    • or, WinKey + E > Folder Path address bar > paste > enter
  6. Right-Click > Copy the npm folder
  7. Go to this folder %APPDATA%\nvm\v14.20.0\node_modules
  8. Rename the npm folder to npm-6.14.17 as a backup
  9. Paste in the npm folder copied from the 16.10.0\node_modules folder
  10. nvm use 14.20.0
  11. node -v && npm -v - Should give 14.20.0 and 7.24.0

Oldest comments (0)