If you are a Mac user, then Homebrew is the best way to add packages.
But if you have a Windows machine, then there are two package managers that I recommend Chocolatey or Scoop.
Chocolatey (with LTS version)
- Run Windows Powershell as administrator
- Run command
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
- Reopen the Powershell
- Install the LTS version
choco install nodejs-lts --version=VERSION_NUMBER
- Reopen the Powershell, and run the command below to test
node -v
Scoop (with nvm)
- Run Command Prompt or Windows Powershell as administrator
- Run command
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
- Reopen the powershell
- Install nodejs package and nvm
scoop install nodejs nvm
- install node version and use it
nvm install VERSION_NUMBER
nvm use VERSION_NUMBER
- Repoen the Powershell, and test by using command
node -v
If you have an error to install Chocolatey or Scoop
Please check the execution policy on Powershell.
Chocolatey
Set-ExecutionPolicy AllSigned
or
Set-ExecutionPolicy Bypass -Scope Process
Scoop
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
Top comments (1)
Awesome. thanks for these tips. Helped a ton fix some Docker issues I was having installing node in windows