Skip to content

Instantly share code, notes, and snippets.

@abiriadev
Created October 4, 2021 10:24
Show Gist options
  • Save abiriadev/a5c28424199af5160272c272a4db3c45 to your computer and use it in GitHub Desktop.
Save abiriadev/a5c28424199af5160272c272a4db3c45 to your computer and use it in GitHub Desktop.
quickly setting up node.js environment at VM
#!/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