Last active
March 28, 2024 07:39
-
-
Save crazyoptimist/e003588c2c667ea0fb6b81bba34b662e to your computer and use it in GitHub Desktop.
Install the latest version of nvm, node, npm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check the latest version of NVM | |
curl https://github.com/nvm-sh/nvm/releases/latest | cut -d \/ -f 8 | cut -d \" -f 1 | |
# Run the install script | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash | |
# Paste in this scripts into your .bashrc or .bash_profile | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" | |
# Install node and npm | |
nvm ls-remote | |
nvm install lts/iron # Change the version according to your reference | |
# nvm alias default v20.11.8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script will install
nvm
and node latest lts version on your nix OS real quick!