-
-
Save jesusalber1/6634156ea6caba427a4c to your computer and use it in GitHub Desktop.
Install node.js
This file contains 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
# Joyent instructions (https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#debian-and-ubuntu-based-linux-distributions) | |
# Download from the source | |
curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash - | |
# Installing node directly (latest version) | |
sudo apt-get install --yes nodejs | |
# Build tools for npm | |
sudo apt-get install --yes build-essential | |
# Install node-gyp | |
sudo npm install -g node-gyp |
This file contains 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
# Check current version on https://github.com/creationix/nvm (current v0.25.4) | |
curl https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash | |
source ~/.profile | |
#List all available versions | |
nvm ls-remote | |
#Install node version (current v0.12.7). Check versions: node-v; npm -v | |
nvm install v0.12.7 | |
#Install node.js globally | |
cd ~/.nvm/versions/node/v0.12.7 | |
chmod -R 755 bin/* | |
sudo cp -r {bin,lib,share} /usr/local/ | |
# Install node-gyp | |
npm install -g node-gyp | |
# Done! |
#node
curl --silent --location https://deb.nodesource.com/setup_18.x | sudo bash -
#nvm
curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
#node curl --silent --location https://deb.nodesource.com/setup_18.x | sudo bash - #nvm curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
Thank you. I got a deprecation warning when I tried using setup_0.12
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in 14 line sudo apt install npm