Created
October 4, 2021 10:24
-
-
Save abiriadev/a5c28424199af5160272c272a4db3c45 to your computer and use it in GitHub Desktop.
quickly setting up node.js environment at VM
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
#!/bin/bash | |
# apt install make -y | |
rm /usr/local/bin/node | |
rm /usr/local/bin/npm | |
rm /usr/local/bin/n | |
rm -r /root/n | |
curl -L https://git.io/n-install > n.sh | |
sudo bash ./n.sh -y | |
rm n.sh | |
. ~/.bashrc | |
/root/n/bin/n latest | |
#sudo npm i -g npm | |
echo node --version: $(node -v) | |
echo npm --version: $(npm -v) | |
sudo npm i -g yarn | |
sudo yarn install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment