Skip to content

Instantly share code, notes, and snippets.

@tskxz
Created May 16, 2024 17:46
Show Gist options
  • Save tskxz/7005336632c9e0e4cee2a0cd710c803b to your computer and use it in GitHub Desktop.
Save tskxz/7005336632c9e0e4cee2a0cd710c803b to your computer and use it in GitHub Desktop.
Install nodejs20 windows
# installs fnm (Fast Node Manager)
winget install Schniz.fnm
# Restart your powershell
# download and install Node.js
fnm use --install-if-missing 20
# If you get error, enter these commands
# Powershell
fnm env --use-on-cd | Out-String | Invoke-Expression
# Windows cmd
FOR /f "tokens=*" %i IN ('fnm env --use-on-cd') DO CALL %i
# verifies the right Node.js version is in the environment
node -v # should print `v20.13.1`
# verifies the right NPM version is in the environment
npm -v # should print `10.5.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment