Node.js
NodeJS is still the go-to runtime for JS.
Install nvm
WARNING
Before installing nvm
, make sure existing node installations are uninstalled
Windows
- Download
nvm-noinstall.zip
from https://github.com/coreybutler/nvm-windows/releases and save it in theDownloads
directory - Extract itpowershell
7z x -y ~/Downloads/nvm-noinstall.zip "-o$HOME/dotbin/extra/portable/nvm"
- Configure environment variablespowershell
$dotbin_nvm=$env:USERPROFILE+"\dotbin\extra\portable\nvm" [System.Environment]::SetEnvironmentVariable('NVM_HOME',$dotbin_nvm,"User") [System.Environment]::SetEnvironmentVariable('NVM_SYMLINK',$dotbin_nvm+"\symlink","User") $path = $dotbin_nvm+";"+$dotbin_nvm+"\symlink;" [System.Environment]::SetEnvironmentVariable('PATH',$path+[System.Environment]::GetEnvironmentVariable('PATH', "User"),"User")
- Configure Settingspowershell
$setting="root: $env:USERPROFILE\dotbin\extra\portable\nvm`npath: $env:USERPROFILE\dotbin\extra\portable\nvm\symlink`narch: 64`nproxy: none" $setting | Out-File -FilePath $env:USERPROFILE\dotbin\extra\portable\nvm\settings.txt
- Restart the shell. Verify installationpowershell
nvm version
Linux
- Clone the
nvm
repositorybashgit clone https://github.com/nvm-sh/nvm.git ~/dotbin/extra/portable/nvm
- Check out the latest release, and activate itbash
cd ~/dotbin/extra/portable/nvm git checkout v0.40.1 . ./nvm.sh
- Add the following to
~/.bashrc
bash# NVM export NVM_DIR="$HOME/dotbin/extra/portable/nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
Install Node with NVM
Install node version you need
bash
nvm install 20
It should automatically be selected as the active node version. You can also manually switch to it
bash
nvm use 20
You can list all the versions with
bash
nvm ls
And confirm the current node version
bash
node -v
npm -v
Deno
Deno is used for publishing packages to JSR
bash
cargo binstall deno
WARNING
Deno doesn't have official release on GitHub that can be downloaded by cargo-binstall
, so a third-party binary is used. If you want to install from source instead (slow to compile)
bash
cargo install deno --locked